From 91ddcaecfaa65ce4996cc9cd23dfa89838a8872b Mon Sep 17 00:00:00 2001 From: Thomas Jentzsch Date: Thu, 16 Jul 2020 17:25:33 +0200 Subject: [PATCH] Prevent enabling phosphor when cycling through global options (fixes #672) --- src/emucore/Console.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx index 1f828ee94..be2907fe9 100644 --- a/src/emucore/Console.cxx +++ b/src/emucore/Console.cxx @@ -525,8 +525,11 @@ void Console::changePhosphor(int direction) { int blend = BSPF::stringToInt(myProperties.get(PropType::Display_PPBlend)); - blend = BSPF::clamp(blend + direction * 2, 0, 100); - myOSystem.frameBuffer().tiaSurface().enablePhosphor(true, blend); + if(direction) + { + blend = BSPF::clamp(blend + direction * 2, 0, 100); + myOSystem.frameBuffer().tiaSurface().enablePhosphor(true, blend); + } ostringstream val; val << blend;