Search
lxdream.org :: lxdream :: r1119:45602839e067
lxdream 0.9.1
released Jun 29
Download Now
changeset1119:45602839e067
parent1118:0c00e6594d01
child1120:7c40a0f687b3
authornkeynes
dateFri Sep 10 08:48:34 2010 +1000 (9 years ago)
Run the eventq at the end of the time-slice rather than the beginning, so
that it runs for the correct period of time when the time-slice finishes
early
src/dreamcast.c
src/eventq.c
src/eventq.h
1.1 --- a/src/dreamcast.c Wed Sep 08 23:16:47 2010 +1000
1.2 +++ b/src/dreamcast.c Fri Sep 10 08:48:34 2010 +1000
1.3 @@ -91,8 +91,10 @@
1.4 {
1.5 char *bios_path = lxdream_get_global_config_path_value(CONFIG_BIOS_PATH);
1.6 char *flash_path = lxdream_get_global_config_path_value(CONFIG_FLASH_PATH);
1.7 +
1.8 + /* Initialize the event queue first */
1.9 + event_init();
1.10
1.11 - dreamcast_register_module( &eventq_module );
1.12 /* Register the memory framework */
1.13 dreamcast_register_module( &mem_module );
1.14
1.15 @@ -127,6 +129,7 @@
1.16 dreamcast_register_module( &aica_module );
1.17 dreamcast_register_module( &maple_module );
1.18 dreamcast_register_module( &ide_module );
1.19 + dreamcast_register_module( &eventq_module );
1.20
1.21 g_free(bios_path);
1.22 g_free(flash_path);
2.1 --- a/src/eventq.c Wed Sep 08 23:16:47 2010 +1000
2.2 +++ b/src/eventq.c Fri Sep 10 08:48:34 2010 +1000
2.3 @@ -53,7 +53,7 @@
2.4 void event_save_state( FILE *f );
2.5 int event_load_state( FILE * f );
2.6
2.7 -struct dreamcast_module eventq_module = { "EVENTQ", event_init, event_reset, NULL, event_run_slice,
2.8 +struct dreamcast_module eventq_module = { "EVENTQ", NULL, event_reset, NULL, event_run_slice,
2.9 NULL, event_save_state, event_load_state };
2.10
2.11 static void event_update_pending( )
3.1 --- a/src/eventq.h Wed Sep 08 23:16:47 2010 +1000
3.2 +++ b/src/eventq.h Fri Sep 10 08:48:34 2010 +1000
3.3 @@ -71,6 +71,11 @@
3.4 */
3.5 void event_execute();
3.6
3.7 +/**
3.8 + * Initialize the event queue.
3.9 + */
3.10 +void event_init();
3.11 +
3.12 #define MAX_EVENT_ID 128
3.13
3.14 /* Events 1..96 are defined as the corresponding ASIC events. */
.