From 35f3cd2098b2c7aa89a8ef857fc6fbf4b345037f Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 9 Apr 2024 15:51:18 +0200 Subject: [PATCH] re-arrange code --- src/emu_actions.c | 3 ++- src/main.c | 4 ++-- src/ui.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/emu_actions.c b/src/emu_actions.c index 97147d6..1d334e4 100644 --- a/src/emu_actions.c +++ b/src/emu_actions.c @@ -312,7 +312,8 @@ void do_shutdown( void ) set_t1 = ticks.t1_ticks; interrupt_called = 0; - if ( ui_get_event() && interrupt_called ) + ui_get_event(); + if ( interrupt_called ) wake = 1; if ( saturn.timer2 <= 0 ) { diff --git a/src/main.c b/src/main.c index 710d1f4..454f6eb 100644 --- a/src/main.c +++ b/src/main.c @@ -107,9 +107,9 @@ int main( int argc, char** argv ) init_display(); /* (G)UI */ - setup_frontend(); - init_ui( argc, argv ); ui_init_LCD(); + setup_frontend(); /* points init_ui to the correct function */ + init_ui( argc, argv ); /************************/ /* Start emulation loop */ diff --git a/src/ui.h b/src/ui.h index 950e0c4..db81866 100644 --- a/src/ui.h +++ b/src/ui.h @@ -68,7 +68,7 @@ extern void ( *ui_draw_annunc )( void ); extern void ( *init_ui )( int argc, char** argv ); /*********************************/ -/* used in: debugger.c, ui_sdl.c */ +/* used in: debugger.c */ /*********************************/ extern void ui_init_LCD( void );