Mini: Fix right button forwarding
This commit is contained in:
parent
2cb6ce635f
commit
104c82c2c3
src/duckstation-mini
|
@ -861,7 +861,9 @@ void MiniHost::ProcessSDLEvent(const SDL_Event* ev)
|
|||
{
|
||||
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,
|
||||
GenericInputBinding::Unknown);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue