Skip to content

Commit

Permalink
windows: Manage MapVirtualKey vs Windows XP.
Browse files Browse the repository at this point in the history
Reference Issue libsdl-org#8666.
  • Loading branch information
icculus committed Jan 26, 2024
1 parent 8272403 commit ca331f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/windows/SDL_windowsevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static SDL_Scancode WindowsScanCodeToSDLScanCode(LPARAM lParam, WPARAM wParam)
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
/* Windows may not report scan codes for some buttons (multimedia buttons etc).
* Get scan code from the VK code.*/
scanCode = LOWORD(MapVirtualKey(vkCode, MAPVK_VK_TO_VSC_EX));
scanCode = LOWORD(MapVirtualKey(vkCode, WIN_IsWindowsXP() ? MAPVK_VK_TO_VSC : MAPVK_VK_TO_VSC_EX));
#endif /*!defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)*/

/* Pause/Break key have a special scan code with 0xe1 prefix.
Expand Down

0 comments on commit ca331f1

Please sign in to comment.