Skip to content

Commit

Permalink
Don't bother deciding if window should be raised or not when given a …
Browse files Browse the repository at this point in the history
…file to load, just do it.
  • Loading branch information
coornio committed Sep 1, 2024
1 parent 582162e commit 50e40e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/CubeChip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ SDL_AppResult SDL_AppEvent(void* pHost, const SDL_Event* Event) {
return SDL_APP_SUCCESS;

case SDL_EVENT_DROP_FILE:
Host.loadGameFile(Event->drop.data, true);
Host.loadGameFile(Event->drop.data);
break;

case SDL_EVENT_WINDOW_MINIMIZED:
Expand Down
4 changes: 2 additions & 2 deletions src/HostClass/EmuHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ void EmuHost::replaceCore() {

/*==================================================================*/

void EmuHost::loadGameFile(const std::filesystem::path& gameFile, const bool alert) {
if (alert) { BVS->raiseWindow(); }
void EmuHost::loadGameFile(const std::filesystem::path& gameFile) {
BVS->raiseWindow();
if (HDM->validateGameFile(gameFile)) {
replaceCore();
}
Expand Down
2 changes: 1 addition & 1 deletion src/HostClass/EmuHost.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class EmuHost final {
}

void pauseSystem(const bool state) const noexcept;
void loadGameFile(const std::filesystem::path&, const bool = false);
void loadGameFile(const std::filesystem::path&);

void processFrame();
};
Expand Down

0 comments on commit 50e40e1

Please sign in to comment.