Skip to content

Commit

Permalink
Fixed warning C4456: declaration of 'e' hides previous local declaration
Browse files Browse the repository at this point in the history
This also fixes incorrect interpretation of OPENVR_SetupJoystckBasedOnLoadedActionManifest() return value.
  • Loading branch information
slouken committed Oct 21, 2024
1 parent 8119568 commit 5c531be
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/video/openvr/SDL_openvrvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ static void OPENVR_VirtualControllerUpdate(void *userdata)
return;
}

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

0 comments on commit 5c531be

Please sign in to comment.