summaryrefslogtreecommitdiff
path: root/src/screen/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen/screen.c')
-rw-r--r--src/screen/screen.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/screen/screen.c b/src/screen/screen.c
index cdc42bf..ff36fe1 100644
--- a/src/screen/screen.c
+++ b/src/screen/screen.c
@@ -215,8 +215,12 @@ static bool touch_callback(void *userdata, s32 index, u8 phase, f64 x, f64 y)
if (x >= third && x <= third * 2.0) {
scr->callback(scr->userdata, CAMU_SCREEN_TOGGLE_PAUSE, NULL);
} else {
- s32 n = (x >= third) ? 1 : -1;
- scr->callback(scr->userdata, CAMU_SCREEN_SKIP, &n);
+ if (scr->touch_mode) {
+ scr->subtitles_enabled = !scr->subtitles_enabled;
+ } else {
+ s32 n = (x >= third) ? 1 : -1;
+ scr->callback(scr->userdata, CAMU_SCREEN_SKIP, &n);
+ }
}
}
}
@@ -605,9 +609,8 @@ static nn_thread_result NNWT_THREADCALL event_thread(void *userdata)
{
struct camu_screen *scr = (struct camu_screen *)userdata;
nn_thread_set_name("window_events");
- // If we decide to close within a poll, we must not expect any
- // window events after that point.
- while (scr->window->poll(scr->window, true)) {
+ while (!scr->window->closed) {
+ scr->window->poll(scr->window, true);
scr->window->process_events(scr->window);
}
return 0;
@@ -832,9 +835,8 @@ bool camu_screen_poll(struct camu_screen *scr, bool block)
}
stl_window_read_events(scr->window);
#else
- if (scr->window->poll(scr->window, block)) {
- scr->window->process_events(scr->window);
- }
+ scr->window->poll(scr->window, block);
+ scr->window->process_events(scr->window);
#endif
#ifdef STELA_PAUSE
return scr->window->should_refresh(scr->window);