From eed26cded9a86534b1fe3979456cec73e36eabdf Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 19 Sep 2023 09:48:25 +0200 Subject: [PATCH] chasing #12 --- src/emu_actions.c | 2 ++ src/ui_x11.c | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/emu_actions.c b/src/emu_actions.c index c0046bd..4a55bff 100644 --- a/src/emu_actions.c +++ b/src/emu_actions.c @@ -273,6 +273,8 @@ void do_shutdown( void ) { if ( got_alarm ) { got_alarm = 0; + ui_update_LCD(); + ticks = get_t1_t2(); if ( saturn.t2_ctrl & 0x01 ) saturn.timer2 = ticks.t2_ticks; diff --git a/src/ui_x11.c b/src/ui_x11.c index ce95d5b..b99031c 100644 --- a/src/ui_x11.c +++ b/src/ui_x11.c @@ -3731,7 +3731,7 @@ void CreateDispWindow( void ) { CompletionType = XShmGetEventBase( dpy ) + ShmCompletion; } - shm_error: +shm_error: XSetErrorHandler( NULL ); XFlush( dpy ); @@ -4689,17 +4689,14 @@ static inline void draw_nibble( int c, int r, int val ) { int x, y; x = ( c * 8 ) + 5; - if ( r <= display.lines ) x -= disp.offset; y = ( r * 2 ) + 20; - val &= 0x0f; if ( val != lcd_buffer[ r ][ c ] ) { - lcd_buffer[ r ][ c ] = val; - XCopyPlane( dpy, nibble_maps[ val ], disp.win, disp.gc, 0, 0, 8, 2, x, y, 1 ); + lcd_buffer[ r ][ c ] = val; } }