Fix issue with touch control editor with no game running. Fixes #18652

This commit is contained in:
Henrik Rydgård 2023-12-31 01:04:14 +01:00
parent cdc8bc6eae
commit 5a7db8aa11

View File

@ -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);