From 12f2c44904a0c77db282684fea2c992a8fdb6d24 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 9 Apr 2024 14:22:47 +0200 Subject: [PATCH] got_alarm is now a bool --- src/emu_actions.c | 4 ++-- src/emu_emulate.c | 2 +- src/emulator.h | 3 ++- src/main.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/emu_actions.c b/src/emu_actions.c index f45c364..97147d6 100644 --- a/src/emu_actions.c +++ b/src/emu_actions.c @@ -13,7 +13,7 @@ static int interrupt_called = 0; extern long nibble_masks[ 16 ]; -int got_alarm; +bool got_alarm; int first_press = 1; // PATCH @@ -300,7 +300,7 @@ void do_shutdown( void ) pause(); if ( got_alarm ) { - got_alarm = 0; + got_alarm = false; ui_refresh_LCD(); diff --git a/src/emu_emulate.c b/src/emu_emulate.c index 929e8f4..706632e 100644 --- a/src/emu_emulate.c +++ b/src/emu_emulate.c @@ -2349,7 +2349,7 @@ inline void schedule( void ) schedule_event--; if ( got_alarm ) { - got_alarm = 0; + got_alarm = false; ui_refresh_LCD(); diff --git a/src/emulator.h b/src/emulator.h index d1332d3..b471e21 100644 --- a/src/emulator.h +++ b/src/emulator.h @@ -2,6 +2,7 @@ #define _HP48_H 1 #include /* int64_t */ +#include #define DEC 10 #define HEX 16 @@ -291,7 +292,7 @@ typedef struct saturn_t { #define NIBBLES_PER_ROW 0x22 #define NIBBLES_NB_BITS 4 -extern int got_alarm; +extern bool got_alarm; extern int set_t1; diff --git a/src/main.c b/src/main.c index 7dc145d..92952d6 100644 --- a/src/main.c +++ b/src/main.c @@ -21,7 +21,7 @@ void signal_handler( int sig ) enter_debugger |= USER_INTERRUPT; break; case SIGALRM: - got_alarm = 1; + got_alarm = true; break; case SIGPIPE: exit_emulator();