mirror of
https://github.com/love2d/megasource.git
synced 2026-08-20 12:40:06 +02:00
update SDL3 to 3.1.6.
This commit is contained in:
@@ -308,21 +308,23 @@ static void WIN_UpdateFocus(SDL_Window *window, bool expect_focus)
|
||||
if (has_focus) {
|
||||
POINT cursorPos;
|
||||
|
||||
bool swapButtons = GetSystemMetrics(SM_SWAPBUTTON) != 0;
|
||||
if (GetAsyncKeyState(VK_LBUTTON)) {
|
||||
data->focus_click_pending |= !swapButtons ? SDL_BUTTON_LMASK : SDL_BUTTON_RMASK;
|
||||
}
|
||||
if (GetAsyncKeyState(VK_RBUTTON)) {
|
||||
data->focus_click_pending |= !swapButtons ? SDL_BUTTON_RMASK : SDL_BUTTON_LMASK;
|
||||
}
|
||||
if (GetAsyncKeyState(VK_MBUTTON)) {
|
||||
data->focus_click_pending |= SDL_BUTTON_MMASK;
|
||||
}
|
||||
if (GetAsyncKeyState(VK_XBUTTON1)) {
|
||||
data->focus_click_pending |= SDL_BUTTON_X1MASK;
|
||||
}
|
||||
if (GetAsyncKeyState(VK_XBUTTON2)) {
|
||||
data->focus_click_pending |= SDL_BUTTON_X2MASK;
|
||||
if (!(window->flags & SDL_WINDOW_MOUSE_CAPTURE)) {
|
||||
bool swapButtons = GetSystemMetrics(SM_SWAPBUTTON) != 0;
|
||||
if (GetAsyncKeyState(VK_LBUTTON)) {
|
||||
data->focus_click_pending |= !swapButtons ? SDL_BUTTON_LMASK : SDL_BUTTON_RMASK;
|
||||
}
|
||||
if (GetAsyncKeyState(VK_RBUTTON)) {
|
||||
data->focus_click_pending |= !swapButtons ? SDL_BUTTON_RMASK : SDL_BUTTON_LMASK;
|
||||
}
|
||||
if (GetAsyncKeyState(VK_MBUTTON)) {
|
||||
data->focus_click_pending |= SDL_BUTTON_MMASK;
|
||||
}
|
||||
if (GetAsyncKeyState(VK_XBUTTON1)) {
|
||||
data->focus_click_pending |= SDL_BUTTON_X1MASK;
|
||||
}
|
||||
if (GetAsyncKeyState(VK_XBUTTON2)) {
|
||||
data->focus_click_pending |= SDL_BUTTON_X2MASK;
|
||||
}
|
||||
}
|
||||
|
||||
SDL_SetKeyboardFocus(data->keyboard_focus ? data->keyboard_focus : window);
|
||||
@@ -706,7 +708,7 @@ static void WIN_HandleRawKeyboardInput(Uint64 timestamp, SDL_VideoData *data, HA
|
||||
return;
|
||||
}
|
||||
|
||||
bool down = ((rawkeyboard->Flags & RI_KEY_BREAK) != 0);
|
||||
bool down = !(rawkeyboard->Flags & RI_KEY_BREAK);
|
||||
SDL_Scancode code;
|
||||
USHORT rawcode = rawkeyboard->MakeCode;
|
||||
if (data->pending_E1_key_sequence) {
|
||||
|
||||
Reference in New Issue
Block a user