Fixed warning C4456: declaration of 'e' hides previous local declaration

This also fixes incorrect interpretation of OPENVR_SetupJoystckBasedOnLoadedActionManifest() return value.
This commit is contained in:
Sam Lantinga
2024-10-21 15:39:04 -07:00
parent 8119568805
commit 35be8bb7f9

View File

@@ -521,7 +521,7 @@ static void OPENVR_VirtualControllerUpdate(void *userdata)
return; return;
} }
static bool OPENVR_SetupJoystckBasedOnLoadedActionManifest(SDL_VideoData * videodata) static bool OPENVR_SetupJoystickBasedOnLoadedActionManifest(SDL_VideoData * videodata)
{ {
SDL_VirtualJoystickDesc desc; SDL_VirtualJoystickDesc desc;
int virtual_index; int virtual_index;
@@ -1646,8 +1646,7 @@ static SDL_VideoDevice *OPENVR_CreateDevice(void)
goto error; goto error;
} }
} else { } else {
int e = OPENVR_SetupJoystckBasedOnLoadedActionManifest(data); if(!OPENVR_SetupJoystickBasedOnLoadedActionManifest(data)) {
if(e) {
goto error; goto error;
} }
} }