diff --git a/src/emucore/TIASurface.cxx b/src/emucore/TIASurface.cxx index bf3bd7336..7674e3400 100644 --- a/src/emucore/TIASurface.cxx +++ b/src/emucore/TIASurface.cxx @@ -32,7 +32,7 @@ TIASurface::TIASurface(OSystem& system) myTIA(nullptr), myFilterType(kNormal), myUsePhosphor(false), - myPhosphorPercent(0.77), + myPhosphorPercent(0.77f), myScanlinesEnabled(false), myPalette(nullptr) { diff --git a/src/emucore/TIASurface.hxx b/src/emucore/TIASurface.hxx index 39484eb6b..41cf1998c 100644 --- a/src/emucore/TIASurface.hxx +++ b/src/emucore/TIASurface.hxx @@ -120,7 +120,7 @@ class TIASurface */ uInt8 getPhosphor(uInt8 c1, uInt8 c2) const { // Use maximum of current and decayed previous values - c2 *= myPhosphorPercent; + c2 = uInt8(c2 * myPhosphorPercent); if(c1 > c2) return c1; // raise (assumed immediate) else return c2; // decay }