mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-07 12:05:52 +00:00
Mini: Fix right button forwarding
This commit is contained in:
parent
2cb6ce635f
commit
104c82c2c3
@ -861,7 +861,9 @@ void MiniHost::ProcessSDLEvent(const SDL_Event* ev)
|
|||||||
{
|
{
|
||||||
if (ev->button.button > 0)
|
if (ev->button.button > 0)
|
||||||
{
|
{
|
||||||
Host::RunOnCPUThread([button = ev->button.button - 1, pressed = (ev->type == SDL_EVENT_MOUSE_BUTTON_DOWN)]() {
|
// swap middle/right because sdl orders them differently
|
||||||
|
const u8 button = (ev->button.button == 3) ? 1 : ((ev->button.button == 2) ? 2 : (ev->button.button - 1));
|
||||||
|
Host::RunOnCPUThread([button, pressed = (ev->type == SDL_EVENT_MOUSE_BUTTON_DOWN)]() {
|
||||||
InputManager::InvokeEvents(InputManager::MakePointerButtonKey(0, button), pressed ? 1.0f : 0.0f,
|
InputManager::InvokeEvents(InputManager::MakePointerButtonKey(0, button), pressed ? 1.0f : 0.0f,
|
||||||
GenericInputBinding::Unknown);
|
GenericInputBinding::Unknown);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user