summaryrefslogtreecommitdiff
path: root/indra/llwindow/llgamecontrol.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-10-28 22:53:24 +0200
committerGitHub <noreply@github.com>2024-10-28 22:53:24 +0200
commit9c0a6d1b0e5e9d6da6a63ff367f40ab08c064bbe (patch)
tree70ee7701d7a24a0759915f8050786ed43a8a2a7a /indra/llwindow/llgamecontrol.cpp
parent0ef7a9b39cf72da1211039ab22bdf8f9f6a2c984 (diff)
parentb2f1e8899b32f681e13705d684db9a93d18450ae (diff)
Merge pull request #2966 from secondlife/marchcat/c-develop
develop → Maint C sync
Diffstat (limited to 'indra/llwindow/llgamecontrol.cpp')
-rw-r--r--indra/llwindow/llgamecontrol.cpp8
1 files changed, 8 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)