fix segfault on quit

This commit is contained in:
Evan Pratten 2021-04-26 12:35:12 -04:00
parent 3da8bb06ed
commit f9091fbce2

View File

@ -140,16 +140,16 @@ fn main() {
.create_statistics(&game_core, draw_handle.get_time()); .create_statistics(&game_core, draw_handle.get_time());
game_core.progress.update(&new_progress); game_core.progress.update(&new_progress);
// For now, just quit // Break the render loop
// This also throws a SEGFAULT.. yay for unsafe code.. break;
unsafe {
raylib::ffi::CloseWindow();
}
} }
game_core.switch_state(new_state, Some(&draw_handle)); game_core.switch_state(new_state, Some(&draw_handle));
} }
// Feed the audio engine
// audio_system.update();
// Feed the profiler // Feed the profiler
// This only runs in the dev profile. // This only runs in the dev profile.
#[cfg(debug_assertions)] #[cfg(debug_assertions)]