From 28504f5791d4adcb5d83a51c2e677dc1971742ab Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 16 Oct 2024 11:05:38 -0700 Subject: [PATCH] Steam virtual gamepad info isn't available in the macOS sandbox --- src/joystick/SDL_steam_virtual_gamepad.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/joystick/SDL_steam_virtual_gamepad.c b/src/joystick/SDL_steam_virtual_gamepad.c index 1250dd6972..4b446b20fb 100644 --- a/src/joystick/SDL_steam_virtual_gamepad.c +++ b/src/joystick/SDL_steam_virtual_gamepad.c @@ -127,6 +127,11 @@ void SDL_InitSteamVirtualGamepadInfo(void) SDL_AssertJoysticksLocked(); + // The file isn't available inside the macOS sandbox + if (SDL_GetSandbox() == SDL_SANDBOX_MACOS) { + return; + } + file = SDL_GetHint(SDL_HINT_STEAM_VIRTUAL_GAMEPAD_INFO_FILE); if (file && *file) { SDL_steam_virtual_gamepad_info_file = SDL_strdup(file);