From 97c0cc45ecc38940fbf6eab65d23c84b915e11e5 Mon Sep 17 00:00:00 2001 From: mudlord Date: Wed, 5 Dec 2007 23:33:20 +0000 Subject: [PATCH] Fixed RTC emulation a little --- src/RTC.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/RTC.cpp b/src/RTC.cpp index 7767c140..042ffb3c 100644 --- a/src/RTC.cpp +++ b/src/RTC.cpp @@ -59,12 +59,16 @@ bool rtcIsEnabled() u16 rtcRead(u32 address) { if(rtcEnabled) { - if(address == 0x80000c8) + switch(address){ + case 0x80000c8: return rtcClockData.byte2; - else if(address == 0x80000c6) + break; + case 0x80000c6: return rtcClockData.byte1; - else if(address == 0x80000c4) { + break; + case 0x80000c4: return rtcClockData.byte0; + break; } } @@ -188,7 +192,7 @@ bool rtcWrite(u32 address, u16 value) } } break; - default: + default: break; } } else