refactor: set alwaysrelease to true when releasing Alt-Tab

This commit is contained in:
Dimitris Panokostas 2024-10-10 17:43:13 +02:00
parent 731b3b27a2
commit e3e0b82ec9
No known key found for this signature in database
GPG Key ID: 330156A68E9E0929

View File

@ -361,8 +361,8 @@ int keyhack (const int scancode, const int pressed, const int num)
{
if (pressed && state[SDL_SCANCODE_LALT] && scancode == SDL_SCANCODE_TAB) {
// Ensure we release Alt-Tab before we release capture
inputdevice_translatekeycode(num, SDL_SCANCODE_TAB, 0, false);
inputdevice_translatekeycode(num, SDL_SCANCODE_LALT, 0, false);
inputdevice_translatekeycode(num, SDL_SCANCODE_TAB, 0, true);
inputdevice_translatekeycode(num, SDL_SCANCODE_LALT, 0, true);
disablecapture();
return -1;