diff options
-rw-r--r-- | indra/llwindow/llgamecontrol.cpp | 8 | ||||
-rw-r--r-- | indra/llwindow/llwindow.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llurldispatcher.cpp | 2 |
3 files changed, 13 insertions, 1 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, diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 166542324d..647210b7e6 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -306,7 +306,7 @@ public: if (tokens.size() < 1) return false; LLVector3 coords(128, 128, 0); - if (tokens.size() <= 4) + if (tokens.size() >= 3) // Require at least [1] and [2] { coords = LLVector3((F32)tokens[1].asReal(), (F32)tokens[2].asReal(), |