1
0
Fork 0
forked from Miroirs/x49gp

take notes for gtk4

This commit is contained in:
Gwenhael Le Moine 2024-11-12 15:08:31 +01:00
parent cd5f87b9d8
commit 491e8e9171
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -129,7 +129,6 @@ uint32_t do_arm_semihosting( CPUState* env )
env->regs[ 1 ], env->regs[ 2 ], env->regs[ 3 ], env->regs[ 4 ], env->regs[ 5 ], env->regs[ 6 ], env->regs[ 7 ] );
#endif
#if 1
switch ( env->regs[ 0 ] ) {
case 305: /* Beep */
printf( "%s: BEEP: frequency %u, time %u, override %u\n", __FUNCTION__, env->regs[ 1 ], env->regs[ 2 ],
@ -150,7 +149,6 @@ uint32_t do_arm_semihosting( CPUState* env )
default:
break;
}
#endif
break;
default:
@ -193,8 +191,13 @@ static void arm_sighnd( int sig )
void x49gp_gtk_timer( void* data )
{
#if GTK_MAJOR_VERSION == 4
while ( g_main_context_pending( NULL ) )
g_main_context_iteration( NULL, false );
#else
while ( gtk_events_pending() )
gtk_main_iteration_do( false );
#endif
x49gp_mod_timer( x49gp->gtk_timer, x49gp_get_clock() + X49GP_GTK_REFRESH_INTERVAL );
}
@ -230,7 +233,11 @@ int main( int argc, char** argv )
char* progname = g_path_get_basename( argv[ 0 ] );
char* progpath = g_path_get_dirname( argv[ 0 ] );
#if GTK_MAJOR_VERSION == 4
gtk_init();
#else
gtk_init( &argc, &argv );
#endif
config_init( progname, argc, argv );