engine: platform: sdl2: disable high dpi support on Windows temporarily

This commit is contained in:
Alibek Omarov
2025-12-14 00:17:01 +05:00
parent 66ea91270b
commit 40c7c5b348
2 changed files with 9 additions and 2 deletions

View File

@@ -108,7 +108,9 @@ void SDLash_Init( const char *basedir )
#if XASH_WIN32
SDL_SetHint( SDL_HINT_WINDOWS_DPI_AWARENESS, "permonitorv2" );
SDL_SetHint( SDL_HINT_WINDOWS_DPI_SCALING, "1" );
// TODO: disabled for now
// try to test it better when we'll come back to highdpi support issue
// SDL_SetHint( SDL_HINT_WINDOWS_DPI_SCALING, "1" );
#endif // XASH_WIN32
if( SDL_Init( SDL_INIT_TIMER | SDL_INIT_VIDEO | SDL_INIT_EVENTS ) )

View File

@@ -651,10 +651,15 @@ VID_CreateWindow
*/
qboolean VID_CreateWindow( int input_width, int input_height, window_mode_t window_mode )
{
Uint32 flags = SDL_WINDOW_SHOWN | SDL_WINDOW_MOUSE_FOCUS | SDL_WINDOW_ALLOW_HIGHDPI;
Uint32 flags = SDL_WINDOW_SHOWN | SDL_WINDOW_MOUSE_FOCUS;
SDL_Rect rect = { window_xpos.value, window_ypos.value, input_width, input_height };
const qboolean position_undefined = rect.x < 0 || rect.y < 0;
// TODO: disabled for Windows for now
#if !XASH_WIN32
SetBits( flags, SDL_WINDOW_ALLOW_HIGHDPI );
#endif // !XASH_WIN32
if( !glw_state.software )
SetBits( flags, SDL_WINDOW_OPENGL );