engine: remove inclusion of SDL headers globally, helps to cleanup code before SDL3 migration

This commit is contained in:
Alibek Omarov
2025-02-28 13:14:47 +03:00
parent bbbd7711c1
commit a5f0ca38f1
14 changed files with 59 additions and 52 deletions

View File

@@ -13,17 +13,17 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#include "platform/platform.h"
#define DBGHELP 1 // we always enable dbghelp.dll on Windows targets
#if DBGHELP
#include <winnt.h>
#include <dbghelp.h>
#include <psapi.h>
#include <time.h>
#include "platform/platform.h"
#include "input.h"
#define DBGHELP 1 // we always enable dbghelp.dll on Windows targets
#if DBGHELP
#ifndef XASH_SDL
typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
#endif
@@ -268,8 +268,8 @@ static long _stdcall Sys_Crash( PEXCEPTION_POINTERS pInfo )
// check to avoid recursive call
host.crashed = true;
#ifdef XASH_SDL
SDL_SetWindowGrab( host.hWnd, SDL_FALSE );
#if !XASH_DEDICATED
IN_SetMouseGrab( false );
#endif // XASH_SDL
#if DBGHELP

View File

@@ -36,6 +36,11 @@ double Platform_DoubleTime( void )
return (double)( CurrentTime.QuadPart - g_ClockStart.QuadPart ) / (double)( g_PerformanceFrequency.QuadPart );
}
void Platform_Sleep( int msec )
{
Sleep( msec );
}
#endif // XASH_TIMER == TIMER_WIN32
void Win32_Init( qboolean con_showalways )