From 34933b7e1d682e67702999270cd3ceec0e167316 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Thu, 2 Jul 2026 17:52:27 -0400 Subject: Update deps, build fixes, cleanup Signed-off-by: Andrew Opalach --- src/screen/screen.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/screen') 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); -- cgit v1.2.3-101-g0448