Browse Source

platform/sdl: add check for missing hint defines

pull/2/head
mittorn 1 year ago committed by Alibek Omarov
parent
commit
1bfb6c560a
  1. 2
      engine/client/in_touch.c
  2. 4
      engine/platform/sdl/vid_sdl.c

2
engine/client/in_touch.c

@ -1087,7 +1087,7 @@ void Touch_Init( void ) @@ -1087,7 +1087,7 @@ void Touch_Init( void )
#if SDL_VERSION_ATLEAST( 2, 0, 10 )
SDL_SetHint( SDL_HINT_MOUSE_TOUCH_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" );
#endif

4
engine/platform/sdl/vid_sdl.c

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

Loading…
Cancel
Save