windows: Manage MapVirtualKey vs Windows XP.

Reference Issue #8666.
main
Ryan C. Gordon 2024-01-25 19:03:17 -05:00
parent 1c5bc53738
commit 6ca596cfc1
1 changed files with 1 additions and 1 deletions

View File

@ -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.