Skip to content

Commit

Permalink
ui: file dropping can start multiple games at once
Browse files Browse the repository at this point in the history
Happens on macOS, linux and likely others.
Fixes MINIDUMP-2N4
  • Loading branch information
flyinghead committed Mar 7, 2024
1 parent 0aa8910 commit b550542
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions core/rend/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,8 @@ void gui_open_settings()
void gui_start_game(const std::string& path)
{
const LockGuard lock(guiMutex);
if (gui_state != GuiState::Main && gui_state != GuiState::Closed && gui_state != GuiState::Commands)
return;
emu.unloadGame();
reset_vmus();
chat.reset();
Expand Down
1 change: 0 additions & 1 deletion shell/apple/emulator-ios/emulator/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ - (BOOL)application:(UIApplication *)application openURL:(nonnull NSURL *)url op
}
if ([url startAccessingSecurityScopedResource])
openedURL = url;
gui_setState(GuiState::Closed);
gui_start_game(url.fileSystemRepresentation);

return true;
Expand Down

0 comments on commit b550542

Please sign in to comment.