engine: platform: sdl2: move dpi awareness hint set before SDL_Init, as documentation says it needs to be set before video init

This commit is contained in:
Alibek Omarov
2025-11-23 14:54:15 +05:00
parent a2b597577f
commit 07da038b4b

View File

@@ -106,6 +106,10 @@ void SDLash_Init( const char *basedir )
else
SDL_LogSetAllPriority( SDL_LOG_PRIORITY_ERROR );
#if XASH_WIN32
SDL_SetHint( SDL_HINT_WINDOWS_DPI_AWARENESS, "permonitorv2" );
#endif // XASH_WIN32
if( SDL_Init( SDL_INIT_TIMER | SDL_INIT_VIDEO | SDL_INIT_EVENTS ) )
{
Sys_Warn( "SDL_Init failed: %s", SDL_GetError() );
@@ -119,10 +123,6 @@ void SDLash_Init( const char *basedir )
#endif // SDL_HINT_MOUSE_TOUCH_EVENTS
SDL_SetHint( SDL_HINT_TOUCH_MOUSE_EVENTS, "0" );
#if XASH_WIN32
SDL_SetHint( SDL_HINT_WINDOWS_DPI_AWARENESS, "permonitorv2" );
#endif // XASH_WIN32
SDL_StopTextInput();
SDLash_InitCursors();