Skip to content

Commit

Permalink
Merge pull request #20035 from hrydgard/hide-buttons-setting
Browse files Browse the repository at this point in the history
Allow binding Toggle touch controls to a custom touch button
  • Loading branch information
hrydgard authored Feb 25, 2025
2 parents 805816d + 7853803 commit 3751a2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions UI/EmuScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,10 @@ bool EmuScreen::UnsyncTouch(const TouchInput &touch) {
}
}

if (!(g_Config.bShowImDebugger && imguiInited_)) {
GamepadTouch();
if (touch.flags & TOUCH_DOWN) {
if (!(g_Config.bShowImDebugger && imguiInited_)) {
GamepadTouch();
}
}

if (root_) {
Expand Down
1 change: 1 addition & 0 deletions UI/GamepadEmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ namespace CustomKeyData {
{ ImageID::invalid(), VIRTKEY_AXIS_X_MAX },
{ ImageID::invalid(), VIRTKEY_AXIS_Y_MAX },
{ ImageID::invalid(), VIRTKEY_PREVIOUS_SLOT },
{ ImageID::invalid(), VIRTKEY_TOGGLE_TOUCH_CONTROLS },
};
static_assert(ARRAY_SIZE(customKeyList) <= 64, "Too many key for a uint64_t bit mask");
};
Expand Down

0 comments on commit 3751a2b

Please sign in to comment.