mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
Implement "Touch gliding" (keep all dragged/touched buttons pressed until touch release)
I think the feature might need a better name though? Fixes #14490
This commit is contained in:
1 parent
4f2ceca071
commit
5ef2f06019
4 files changed
+9
-1
No files matched your search
@@ -284,6 +284,7 @@ static const ConfigSetting generalSettings[] = {
|
||||
ConfigSetting("SwipeSmoothing", &g_Config.fSwipeSmoothing, 0.3f, CfgFlag::PER_GAME),
|
||||
ConfigSetting("DoubleTapGesture", &g_Config.iDoubleTapGesture, 0, CfgFlag::PER_GAME),
|
||||
ConfigSetting("GestureControlEnabled", &g_Config.bGestureControlEnabled, false, CfgFlag::PER_GAME),
|
||||
ConfigSetting("TouchGliding", &g_Config.bTouchGliding, false, CfgFlag::PER_GAME),
|
||||
|
||||
// "default" means let emulator decide, "" means disable.
|
||||
ConfigSetting("ReportingHost", &g_Config.sReportHost, "default", CfgFlag::DEFAULT),
|
||||
|
||||
@@ -361,7 +361,9 @@ public:
|
||||
|
||||
// Disable diagonals
|
||||
bool bDisableDpadDiagonals;
|
||||
|
||||
bool bGamepadOnlyFocused;
|
||||
|
||||
// Control Style
|
||||
int iTouchButtonStyle;
|
||||
int iTouchButtonOpacity;
|
||||
@@ -377,6 +379,9 @@ public:
|
||||
// Sticky D-pad (can't glide off it)
|
||||
bool bStickyTouchDPad;
|
||||
|
||||
// Touch gliding (see #14490)
|
||||
bool bTouchGliding;
|
||||
|
||||
//space between PSP buttons
|
||||
//the PSP button's center (triangle, circle, square, cross)
|
||||
ConfigTouchPos touchActionButtonCenter;
|
||||
|
||||
@@ -801,6 +801,8 @@ void GameSettingsScreen::CreateControlsSettings(UI::ViewGroup *controlsSettings)
|
||||
autoHide->SetFormat(di->T("%d seconds"));
|
||||
autoHide->SetZeroLabel(co->T("Off"));
|
||||
|
||||
controlsSettings->Add(new CheckBox(&g_Config.bTouchGliding, co->T("Touch gliding")));
|
||||
|
||||
// Hide stick background, useful when increasing the size
|
||||
CheckBox *hideStickBackground = controlsSettings->Add(new CheckBox(&g_Config.bHideStickBackground, co->T("Hide touch analog stick background circle")));
|
||||
hideStickBackground->SetEnabledPtr(&g_Config.bShowTouchControls);
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ bool MultiTouchButton::Touch(const TouchInput &input) {
|
||||
if (!(input.flags & TOUCH_MOUSE) || input.buttons) {
|
||||
if (bounds_.Contains(input.x, input.y) && !(analogPointerMask & (1 << input.id)))
|
||||
pointerDownMask_ |= 1 << input.id;
|
||||
else
|
||||
else if (!g_Config.bTouchGliding)
|
||||
pointerDownMask_ &= ~(1 << input.id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user