Skip to content

Commit

Permalink
Ok.
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonx254 committed Mar 19, 2023
1 parent 6f2df40 commit b917819
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions RSDKv3/RetroEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ bool ProcessEvents()
}
case SDL_WINDOWEVENT_CLOSE: Engine.gameMode = ENGINE_EXITGAME; return false;
case SDL_WINDOWEVENT_FOCUS_LOST:
if (!(disableFocusPause & 1))
if (!((disableFocusPause + 1) & 1))
Engine.message = MESSAGE_LOSTFOCUS;
Engine.hasFocus = false;
break;
Expand All @@ -57,7 +57,7 @@ bool ProcessEvents()
case SDL_CONTROLLERDEVICEADDED: ControllerInit(Engine.sdlEvents.cdevice.which); break;
case SDL_CONTROLLERDEVICEREMOVED: ControllerClose(Engine.sdlEvents.cdevice.which); break;
case SDL_APP_WILLENTERBACKGROUND:
if (!(disableFocusPause & 1))
if (!((disableFocusPause + 1) & 1))
Engine.message = MESSAGE_LOSTFOCUS;
Engine.hasFocus = false;
break;
Expand Down Expand Up @@ -370,7 +370,7 @@ void RetroEngine::Run()
running = ProcessEvents();

// Focus Checks
if (!(disableFocusPause & 2)) {
if (!((disableFocusPause + 1) & 2)) {
if (!Engine.hasFocus) {
if (!(Engine.focusState & 1))
Engine.focusState = PauseSound() ? 3 : 1;
Expand Down
3 changes: 1 addition & 2 deletions RSDKv3/Userdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,8 +783,7 @@ void WriteSettings()
ini.SetComment("Game", "DTCtrlComment", "Determines if the game should hide the touch controls UI");
ini.SetBool("Game", "DisableTouchControls", disableTouchControls);
ini.SetComment("Game", "DFPMenuComment",
"Handles pausing behaviour when focus is lost\n; 0 = Game focus enabled, engine focus enabled\n; 1 = Game focus disabled, "
"engine focus enabled\n; 2 = Game focus enabled, engine focus disabled\n; 3 = Game focus disabled, engine focus disabled");
"Handles pausing behaviour when focus is lost\n; 0 = Game focus enabled, engine focus enabled\n; 1 = Game focus enabled, engine focus disabled\n; 2 = Game focus disabled, engine focus disabled");
ini.SetInteger("Game", "DisableFocusPause", disableFocusPause_Config);
ini.SetComment("Game", "PlatformComment", "The platform type. 0 is standard (PC/Console), 1 is mobile");
ini.SetInteger("Game", "Platform", !StrComp(Engine.gamePlatform, "Standard"));
Expand Down

0 comments on commit b917819

Please sign in to comment.