mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 09:13:39 +01:00
Split the functions up, so you don't have to care about the Unsync ones at all in most cases while still getting synced behavior.
This commit is contained in:
1 parent
cca613e785
commit
3715b1ffa1
8 files changed
+97
-42
No files matched your search
@@ -82,11 +82,11 @@ void ScreenManager::touch(const TouchInput &touch) {
|
||||
if (touch.flags & TOUCH_RELEASE_ALL) {
|
||||
for (auto &layer : stack_) {
|
||||
Screen *screen = layer.screen;
|
||||
layer.screen->touch(screen->transformTouch(touch));
|
||||
layer.screen->UnsyncTouch(screen->transformTouch(touch));
|
||||
}
|
||||
} else if (!stack_.empty()) {
|
||||
Screen *screen = stack_.back().screen;
|
||||
stack_.back().screen->touch(screen->transformTouch(touch));
|
||||
stack_.back().screen->UnsyncTouch(screen->transformTouch(touch));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,10 +96,10 @@ bool ScreenManager::key(const KeyInput &key) {
|
||||
// Send key up to every screen layer, to avoid stuck keys.
|
||||
if (key.flags & KEY_UP) {
|
||||
for (auto &layer : stack_) {
|
||||
result = layer.screen->key(key);
|
||||
result = layer.screen->UnsyncKey(key);
|
||||
}
|
||||
} else if (!stack_.empty()) {
|
||||
result = stack_.back().screen->key(key);
|
||||
result = stack_.back().screen->UnsyncKey(key);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -120,10 +120,10 @@ void ScreenManager::axis(const AxisInput &axis) {
|
||||
// Send center axis to every screen layer.
|
||||
if (axis.value == 0) {
|
||||
for (auto &layer : stack_) {
|
||||
layer.screen->axis(axis);
|
||||
layer.screen->UnsyncAxis(axis);
|
||||
}
|
||||
} else if (!stack_.empty()) {
|
||||
stack_.back().screen->axis(axis);
|
||||
stack_.back().screen->UnsyncAxis(axis);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user