diff options
author | Andrew Meadows <leviathan@lindenlab.com> | 2024-10-24 13:40:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-24 13:40:19 -0700 |
commit | e90c6a8ebc189a7a455797a295d9311ecbb6e61f (patch) | |
tree | 3e255c212b93cf49f66cc927bac969e9de85c81f | |
parent | b611324db58def7d65f4bfc721e7dc1c378b7fa3 (diff) | |
parent | f9dc4f40b8dc36b0436e8cf7412626f290743722 (diff) |
Merge pull request #2890 from secondlife/leviathan/disable-sdl2-on-mac
temporary workaround for #2870: disable SDL2 on mac
-rw-r--r-- | indra/llwindow/llgamecontrol.cpp | 8 | ||||
-rw-r--r-- | indra/llwindow/llwindow.cpp | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/indra/llwindow/llgamecontrol.cpp b/indra/llwindow/llgamecontrol.cpp index 9d3c854ca2..67847600e7 100644 --- a/indra/llwindow/llgamecontrol.cpp +++ b/indra/llwindow/llgamecontrol.cpp @@ -1530,6 +1530,9 @@ void LLGameControl::init(const std::string& gamecontrollerdb_path, llassert(saveObject); llassert(updateUI); +#ifndef LL_DARWIN + // SDL2 is temporarily disabled on Mac, so this needs to be a no-op on that platform + int result = SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR); if (result < 0) { @@ -1555,6 +1558,7 @@ void LLGameControl::init(const std::string& gamecontrollerdb_path, LL_INFOS("SDL2") << "Total " << count << " mappings added from " << gamecontrollerdb_path << LL_ENDL; } } +#endif // LL_DARWIN g_gameControl = LLGameControl::getInstance(); @@ -1614,6 +1618,9 @@ void LLGameControl::clearAllStates() // static void LLGameControl::processEvents(bool app_has_focus) { +#ifndef LL_DARWIN + // SDL2 is temporarily disabled on Mac, so this needs to be a no-op on that platform + // This method used by non-linux platforms which only use SDL for GameController input SDL_Event event; if (!app_has_focus) @@ -1631,6 +1638,7 @@ void LLGameControl::processEvents(bool app_has_focus) { handleEvent(event, app_has_focus); } +#endif // LL_DARWIN } void LLGameControl::handleEvent(const SDL_Event& event, bool app_has_focus) diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index 93ac58ca6f..066d29c624 100644 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -416,7 +416,11 @@ LLWindow* LLWindowManager::createWindow( if (use_gl) { +#ifndef LL_DARWIN + // SDL2 is temporarily disabled on Mac init_sdl(); +#endif + #if LL_WINDOWS new_window = new LLWindowWin32(callbacks, title, name, x, y, width, height, flags, |