[UI] Shut down the profiler before the graphics context

This commit is contained in:
DrChat 2018-02-28 15:05:10 -06:00
parent 2a52156edf
commit a976056afb
1 changed files with 5 additions and 1 deletions

View File

@ -174,13 +174,17 @@ int xenia_main(const std::vector<std::wstring>& args) {
evt->Set();
});
emulator_window->window()->on_closing.AddListener([&](ui::UIEvent* e) {
// This needs to shut down before the graphics context.
Profiler::Shutdown();
});
bool exiting = false;
emulator_window->loop()->on_quit.AddListener([&](ui::UIEvent* e) {
exiting = true;
evt->Set();
// TODO(DrChat): Remove this code and do a proper exit.
Profiler::Shutdown();
XELOGI("Cheap-skate exit!");
exit(0);
});