Skip to content

Commit

Permalink
SDL: send ContextMenu when pressing gamecontroller Y button
Browse files Browse the repository at this point in the history
  • Loading branch information
Frenzie committed May 21, 2024
1 parent 99a6bd1 commit 7c21f99
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ffi/SDL2_0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ function S.waitForEvent(sec, usec)
elseif button == SDL.SDL_CONTROLLER_BUTTON_B then
-- send escape
genEmuEvent(C.EV_KEY, 27, 1)
elseif button == SDL.SDL_CONTROLLER_BUTTON_Y then
-- send ContextMenu
genEmuEvent(C.EV_KEY, 1073741925, 1)
-- left bumper
elseif button == SDL.SDL_CONTROLLER_BUTTON_BACK then
-- send page up
Expand Down

0 comments on commit 7c21f99

Please sign in to comment.