move replaying into the event loop
This commit is contained in:
@@ -339,12 +339,6 @@ void init_boe(int argc, char* argv[]) {
|
||||
init_mini_map();
|
||||
redraw_screen(REFRESH_NONE);
|
||||
showMenuBar();
|
||||
|
||||
if(replaying){
|
||||
while(has_next_action()){
|
||||
replay_next_action();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void showWelcome() {
|
||||
@@ -361,6 +355,9 @@ void handle_events() {
|
||||
cFramerateLimiter fps_limiter;
|
||||
|
||||
while(!All_Done) {
|
||||
if(replaying && has_next_action()){
|
||||
replay_next_action();
|
||||
}else{
|
||||
#ifdef __APPLE__
|
||||
if (menuChoiceId>=0) {
|
||||
eMenuChoice aMenuChoice=menuChoice;
|
||||
@@ -387,6 +384,7 @@ void handle_events() {
|
||||
// Alternatively, minimap could live on its own thread.
|
||||
// But for now we just handle events from both windows on this thread.
|
||||
while(map_visible && mini_map.pollEvent(currentEvent)) handle_one_minimap_event(currentEvent);
|
||||
}
|
||||
|
||||
if(changed_display_mode) {
|
||||
changed_display_mode = false;
|
||||
|
Reference in New Issue
Block a user