Moving shutdown logic to Emulator.

This commit is contained in:
Ben Vanik
2014-01-15 07:31:21 -08:00
parent 991e7d8ad3
commit 2a7f3de1c3
4 changed files with 11 additions and 5 deletions

View File

@@ -145,6 +145,16 @@ XECLEANUP:
return result;
}
void Emulator::set_main_window(Window* window) {
XEASSERTNULL(main_window_);
main_window_ = window;
window->closed.AddListener([](UIEvent& e) {
// TODO(benvanik): call module API to kill? this is a bad shutdown.
exit(1);
});
}
X_STATUS Emulator::LaunchXexFile(const xechar_t* path) {
// We create a virtual filesystem pointing to its directory and symlink
// that to the game filesystem.