merge GetEvent() and SDLGetEvent() into get_ui_event()

This commit is contained in:
Gwenhael Le Moine 2023-05-03 09:40:52 +02:00
parent 4e357f1cb1
commit ba5a83e730
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
4 changed files with 895 additions and 902 deletions

View file

@ -412,12 +412,7 @@ void do_shutdown( void ) {
set_t1 = ticks.t1_ticks;
interrupt_called = 0;
#if defined( GUI_IS_X11 )
if ( GetEvent() ) {
#endif
#if defined( GUI_IS_SDL1 )
if ( SDLGetEvent() ) {
#endif
if ( get_ui_event() ) {
if ( interrupt_called )
wake = 1;
}

View file

@ -2444,16 +2444,13 @@ inline void schedule( void ) {
if ( got_alarm ) {
got_alarm = 0;
#if defined( GUI_IS_X11 )
#ifdef HAVE_XSHM
if ( disp.display_update )
refresh_display();
#endif
GetEvent();
#endif
#if defined( GUI_IS_SDL1 )
SDLGetEvent();
#endif
get_ui_event();
}
}

File diff suppressed because it is too large Load diff

View file

@ -252,7 +252,7 @@ extern int InitDisplay( int argc, char** argv );
extern void SDLCreateHP();
#endif
extern int GetEvent( void );
extern int get_ui_event( void );
extern void adjust_contrast( int contrast );
#if defined( GUI_IS_X11 )
@ -272,7 +272,6 @@ extern void refresh_display( void );
#elif defined( GUI_IS_SDL1 )
extern unsigned int ARGBColors[ BLACK + 1 ];
extern int SDLGetEvent();
extern SDL_Surface* sdlwindow;
extern SDL_Surface* sdlsurface;