Skip to content

Commit 186cf51

Browse files
committed
Revert "Consistently use SDL hint constants from SDL_hints.h"
This reverts commit 11b312e.
1 parent ca1c597 commit 186cf51

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/engine/client/client.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4901,34 +4901,32 @@ int main(int argc, const char **argv)
49014901
#endif
49024902

49034903
// Do not automatically translate touch events to mouse events and vice versa.
4904-
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");
4905-
SDL_SetHint(SDL_HINT_MOUSE_TOUCH_EVENTS, "0");
4904+
SDL_SetHint("SDL_TOUCH_MOUSE_EVENTS", "0");
4905+
SDL_SetHint("SDL_MOUSE_TOUCH_EVENTS", "0");
49064906

49074907
// Support longer IME composition strings (enables SDL_TEXTEDITING_EXT).
49084908
#if SDL_VERSION_ATLEAST(2, 0, 22)
49094909
SDL_SetHint(SDL_HINT_IME_SUPPORT_EXTENDED_TEXT, "1");
49104910
#endif
49114911

4912-
#if defined(CONF_PLATFORM_MACOS) && SDL_VERSION_ATLEAST(2, 24, 0)
4912+
#if defined(CONF_PLATFORM_MACOS)
49134913
// Hints will not be set if there is an existing override hint or environment variable that takes precedence.
49144914
// So this respects cli environment overrides.
4915-
SDL_SetHint(SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH, "1");
4915+
SDL_SetHint("SDL_MAC_OPENGL_ASYNC_DISPATCH", "1");
49164916
#endif
49174917

4918-
#if SDL_VERSION_ATLEAST(2, 0, 18)
49194918
#if defined(CONF_FAMILY_WINDOWS)
4920-
SDL_SetHint(SDL_HINT_IME_SHOW_UI, g_Config.m_InpImeNativeUi ? "1" : "0");
4919+
SDL_SetHint("SDL_IME_SHOW_UI", g_Config.m_InpImeNativeUi ? "1" : "0");
49214920
#else
4922-
SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");
4923-
#endif
4921+
SDL_SetHint("SDL_IME_SHOW_UI", "1");
49244922
#endif
49254923

49264924
#if defined(CONF_PLATFORM_ANDROID)
49274925
// Trap the Android back button so it can be handled in our code reliably
49284926
// instead of letting the system handle it.
4929-
SDL_SetHint(SDL_HINT_ANDROID_TRAP_BACK_BUTTON, "1");
4927+
SDL_SetHint("SDL_ANDROID_TRAP_BACK_BUTTON", "1");
49304928
// Force landscape screen orientation.
4931-
SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeLeft LandscapeRight");
4929+
SDL_SetHint("SDL_IOS_ORIENTATIONS", "LandscapeLeft LandscapeRight");
49324930
#endif
49334931

49344932
// init SDL

0 commit comments

Comments
 (0)