[App] Disable stuff that crashes the emulator

This commit is contained in:
Margen67
2021-12-19 18:59:12 -08:00
committed by Rick Gibbed
parent f7c14a089d
commit 564a6d6238

View File

@@ -118,6 +118,7 @@ bool EmulatorWindow::Initialize() {
case ui::VirtualKey::kF5: { case ui::VirtualKey::kF5: {
GpuClearCaches(); GpuClearCaches();
} break; } break;
#ifdef DEBUG
case ui::VirtualKey::kF7: { case ui::VirtualKey::kF7: {
// Save to file // Save to file
// TODO: Choose path based on user input, or from options // TODO: Choose path based on user input, or from options
@@ -130,6 +131,7 @@ bool EmulatorWindow::Initialize() {
// TODO: Spawn a new thread to do this. // TODO: Spawn a new thread to do this.
emulator()->RestoreFromFile("test.sav"); emulator()->RestoreFromFile("test.sav");
} break; } break;
#endif // #ifdef DEBUG
case ui::VirtualKey::kF11: { case ui::VirtualKey::kF11: {
ToggleFullscreen(); ToggleFullscreen();
} break; } break;
@@ -186,9 +188,11 @@ bool EmulatorWindow::Initialize() {
file_menu->AddChild( file_menu->AddChild(
MenuItem::Create(MenuItem::Type::kString, "&Open...", "Ctrl+O", MenuItem::Create(MenuItem::Type::kString, "&Open...", "Ctrl+O",
std::bind(&EmulatorWindow::FileOpen, this))); std::bind(&EmulatorWindow::FileOpen, this)));
#ifdef DEBUG
file_menu->AddChild( file_menu->AddChild(
MenuItem::Create(MenuItem::Type::kString, "Close", MenuItem::Create(MenuItem::Type::kString, "Close",
std::bind(&EmulatorWindow::FileClose, this))); std::bind(&EmulatorWindow::FileClose, this)));
#endif // #ifdef DEBUG
file_menu->AddChild(MenuItem::Create(MenuItem::Type::kSeparator)); file_menu->AddChild(MenuItem::Create(MenuItem::Type::kSeparator));
file_menu->AddChild(MenuItem::Create( file_menu->AddChild(MenuItem::Create(
MenuItem::Type::kString, "Show content directory...", MenuItem::Type::kString, "Show content directory...",