mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: platform: sdl2: disable high dpi support on Windows temporarily
This commit is contained in:
@@ -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 ) )
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user