mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Change pointer ID allocation on iOS. Fixes part of #14240
The dialog code checks for touch.id != 0 to decide whether to close. Not sure if really necessary, but keeping it and just changing the IDs.
This commit is contained in:
parent
f5a1de2540
commit
0150dcfd44
2 changed files with 5 additions and 4 deletions
|
@ -226,8 +226,9 @@ bool PopupScreen::touch(const TouchInput &touch) {
|
|||
return UIDialogScreen::touch(touch);
|
||||
}
|
||||
|
||||
if (!box_->GetBounds().Contains(touch.x, touch.y))
|
||||
if (!box_->GetBounds().Contains(touch.x, touch.y)) {
|
||||
TriggerFinish(DR_BACK);
|
||||
}
|
||||
|
||||
return UIDialogScreen::touch(touch);
|
||||
}
|
||||
|
|
|
@ -386,8 +386,8 @@ static LocationHelper *locationHelper;
|
|||
}
|
||||
|
||||
int ToTouchID(UITouch *uiTouch, bool allowAllocate) {
|
||||
// Find the id for the touch. Avoid 0 (mouse.)
|
||||
for (int localId = 1; localId < (int)ARRAY_SIZE(g_touches); ++localId) {
|
||||
// Find the id for the touch.
|
||||
for (int localId = 0; localId < (int)ARRAY_SIZE(g_touches); ++localId) {
|
||||
if (g_touches[localId] == uiTouch) {
|
||||
return localId;
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ int ToTouchID(UITouch *uiTouch, bool allowAllocate) {
|
|||
|
||||
// Allocate a new one, perhaps?
|
||||
if (allowAllocate) {
|
||||
for (int localId = 1; localId < (int)ARRAY_SIZE(g_touches); ++localId) {
|
||||
for (int localId = 0; localId < (int)ARRAY_SIZE(g_touches); ++localId) {
|
||||
if (g_touches[localId] == 0) {
|
||||
g_touches[localId] = uiTouch;
|
||||
return localId;
|
||||
|
|
Loading…
Add table
Reference in a new issue