Skip to content

Commit

Permalink
Fix issue with touch control editor with no game running. Fixes #18652
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Dec 31, 2023
1 parent cdc8bc6 commit 5a7db8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions UI/GamepadEmu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ static float g_gamepadOpacity;
static double g_lastTouch;

void GamepadUpdateOpacity(float force) {
if (coreState != CORE_RUNNING) {
g_gamepadOpacity = 0.0f;
return;
}
if (force >= 0.0f) {
g_gamepadOpacity = force;
return;
}
if (coreState != CORE_RUNNING) {
g_gamepadOpacity = 0.0f;
return;
}

float fadeAfterSeconds = g_Config.iTouchButtonHideSeconds;
float fadeTransitionSeconds = std::min(fadeAfterSeconds, 0.5f);
Expand Down

0 comments on commit 5a7db8a

Please sign in to comment.