]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
power led fake emulation divide by zero
authorToni Wilen <twilen@winuae.net>
Fri, 21 May 2010 18:56:56 +0000 (21:56 +0300)
committerToni Wilen <twilen@winuae.net>
Fri, 21 May 2010 18:56:56 +0000 (21:56 +0300)
cia.cpp

diff --git a/cia.cpp b/cia.cpp
index e31b5f39f78c98d06c0ce3181f8e8ea90978b29c..6ba0395c881244827c007159f398d9dd976f4d0c 100644 (file)
--- a/cia.cpp
+++ b/cia.cpp
@@ -547,8 +547,10 @@ static void led_vsync (void)
                v = 255;
        else if (led_cycles_off && !led_cycles_on)
                v = 0;
-       else
+       else if (led_cycles_off)
                v = led_cycles_on * 255 / led_cycles_off;
+       else
+               v = 255;
        if (v < 0)
                v = 0;
        if (v > 255)