Compare commits
2 commits
b32334bf22
...
389964ae7e
Author | SHA1 | Date | |
---|---|---|---|
|
389964ae7e | ||
|
eee03e3b8e |
2 changed files with 14 additions and 4 deletions
|
@ -36,6 +36,7 @@ The local data are stored under $XDG_CONFIG_HOME/saturn<model>/
|
|||
## Known bugs
|
||||
- I could get neither the 49 nor the 40 ROM running yet.
|
||||
- some bugs in emulation
|
||||
- ncurses UI: sometimes (often) becomes unresponsive (but still quits gracefully on F7)
|
||||
|
||||
## Todo
|
||||
- sdl2 UI: draw LCD on a distinct texture and then draw that texture on the main one
|
||||
|
|
17
src/main.c
17
src/main.c
|
@ -18,15 +18,24 @@
|
|||
#define CONDITION_STACK_SIZE 16
|
||||
#define HANDLER_STACK_SIZE 8
|
||||
|
||||
#define QUERY_EVENTS_EVERY_X_FRAME 4
|
||||
|
||||
void signal_handler( int sig )
|
||||
{
|
||||
static int nb_refreshes_since_last_checking_events = 0;
|
||||
|
||||
switch ( sig ) {
|
||||
/* case SIGINT: /\* Ctrl-C *\/ */
|
||||
/* enter_debugger |= USER_INTERRUPT; */
|
||||
/* break; */
|
||||
/* case SIGINT: /\* Ctrl-C *\/ */
|
||||
/* enter_debugger |= USER_INTERRUPT; */
|
||||
/* break; */
|
||||
case SIGALRM:
|
||||
ui_get_event();
|
||||
if ( nb_refreshes_since_last_checking_events > QUERY_EVENTS_EVERY_X_FRAME ) {
|
||||
nb_refreshes_since_last_checking_events = 0;
|
||||
ui_get_event();
|
||||
}
|
||||
ui_update_display();
|
||||
nb_refreshes_since_last_checking_events++;
|
||||
|
||||
break;
|
||||
case SIGPIPE:
|
||||
ui_stop();
|
||||
|
|
Loading…
Reference in a new issue