platform/sdl: add check for missing hint defines

This commit is contained in:
mittorn 2023-10-21 19:20:18 +03:00 committed by Alibek Omarov
parent 24d6f1788a
commit 1bfb6c560a
2 changed files with 5 additions and 1 deletions

View File

@ -1087,7 +1087,7 @@ void Touch_Init( void )
#if SDL_VERSION_ATLEAST( 2, 0, 10 ) #if SDL_VERSION_ATLEAST( 2, 0, 10 )
SDL_SetHint( SDL_HINT_MOUSE_TOUCH_EVENTS, "0" ); SDL_SetHint( SDL_HINT_MOUSE_TOUCH_EVENTS, "0" );
SDL_SetHint( SDL_HINT_TOUCH_MOUSE_EVENTS, "0" ); SDL_SetHint( SDL_HINT_TOUCH_MOUSE_EVENTS, "0" );
#else #elif defined(SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH)
SDL_SetHint( SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH, "1" ); SDL_SetHint( SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH, "1" );
#endif #endif

View File

@ -1015,8 +1015,12 @@ qboolean R_Init_Video( const int type )
refState.desktopBitsPixel = 16; refState.desktopBitsPixel = 16;
#endif #endif
#ifdef SDL_HINT_QTWAYLAND_WINDOW_FLAGS
SDL_SetHint( SDL_HINT_QTWAYLAND_WINDOW_FLAGS, "OverridesSystemGestures" ); SDL_SetHint( SDL_HINT_QTWAYLAND_WINDOW_FLAGS, "OverridesSystemGestures" );
#endif
#ifdef SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION
SDL_SetHint( SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION, "landscape" ); SDL_SetHint( SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION, "landscape" );
#endif
#if SDL_VERSION_ATLEAST( 2, 0, 0 ) && !XASH_WIN32 #if SDL_VERSION_ATLEAST( 2, 0, 0 ) && !XASH_WIN32
SDL_SetHint( "SDL_VIDEO_X11_XRANDR", "1" ); SDL_SetHint( "SDL_VIDEO_X11_XRANDR", "1" );