Tidy up for EVENT_IDLE case in game_handler, hopefully fixing obscure 'optimise threads' bug
This commit is contained in:
parent
4f0d1c4cfb
commit
b55a717112
|
@ -1,5 +1,9 @@
|
||||||
D2X-Rebirth Changelog
|
D2X-Rebirth Changelog
|
||||||
|
|
||||||
|
20100814
|
||||||
|
--------
|
||||||
|
main/game.c: Tidy up for EVENT_IDLE case in game_handler, hopefully fixing obscure 'optimise threads' bug
|
||||||
|
|
||||||
20100811
|
20100811
|
||||||
--------
|
--------
|
||||||
main/laser.c: The inital vector scaling to compensate previous frame-skipped tracking was not aligned to FrameTime. Removed that code and just divided homer_turn_base values to compensate this offset properly. Thanks to zif for hinting me to that; Added comment about the how and why of the homing missile scaling issue
|
main/laser.c: The inital vector scaling to compensate previous frame-skipped tracking was not aligned to FrameTime. Removed that code and just divided homer_turn_base values to compensate this offset properly. Thanks to zif for hinting me to that; Added comment about the how and why of the homing missile scaling issue
|
||||||
|
|
24
main/game.c
24
main/game.c
|
@ -1205,26 +1205,8 @@ int game_handler(window *wind, d_event *event, void *data)
|
||||||
case EVENT_MOUSE_BUTTON_UP:
|
case EVENT_MOUSE_BUTTON_UP:
|
||||||
case EVENT_MOUSE_BUTTON_DOWN:
|
case EVENT_MOUSE_BUTTON_DOWN:
|
||||||
case EVENT_KEY_COMMAND:
|
case EVENT_KEY_COMMAND:
|
||||||
|
case EVENT_IDLE: // EVENT_IDLE will be removed once all input events are in place
|
||||||
return ReadControls(event);
|
return ReadControls(event);
|
||||||
break;
|
|
||||||
|
|
||||||
case EVENT_IDLE:
|
|
||||||
// GAME LOOP!
|
|
||||||
Config_menu_flag = 0;
|
|
||||||
|
|
||||||
ReadControls(event); // will be removed from here once all input events are in place
|
|
||||||
if (window_get_front() != wind)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (Config_menu_flag) {
|
|
||||||
do_options_menu();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Game_wind)
|
|
||||||
break;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case EVENT_WINDOW_DRAW:
|
case EVENT_WINDOW_DRAW:
|
||||||
if (!time_paused)
|
if (!time_paused)
|
||||||
|
@ -1264,7 +1246,6 @@ int game_handler(window *wind, d_event *event, void *data)
|
||||||
show_menus();
|
show_menus();
|
||||||
Game_wind = NULL;
|
Game_wind = NULL;
|
||||||
mouse_toggle_cursor(1);
|
mouse_toggle_cursor(1);
|
||||||
return 0; // continue closing
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EVENT_WINDOW_CLOSED:
|
case EVENT_WINDOW_CLOSED:
|
||||||
|
@ -1272,11 +1253,10 @@ int game_handler(window *wind, d_event *event, void *data)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialise game, actually runs in main event loop
|
// Initialise game, actually runs in main event loop
|
||||||
|
|
Loading…
Reference in a new issue