From 7bca51aa57fea93e6ab37176c34edcb04deafc85 Mon Sep 17 00:00:00 2001 From: gocha Date: Sat, 3 Apr 2010 23:11:48 +0000 Subject: [PATCH] Fix toBCD(), RTC read date should work right again. --- desmume/src/rtc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desmume/src/rtc.cpp b/desmume/src/rtc.cpp index a72b8ac2b..1df1ca56d 100644 --- a/desmume/src/rtc.cpp +++ b/desmume/src/rtc.cpp @@ -108,7 +108,10 @@ SFORMAT SF_RTC[]={ static const u8 kDefaultCmdBitsSize[8] = {8, 8, 56, 24, 0, 24, 8, 8}; -#define toBCD(x) ((x / 10) << 4) | (x % 10); +static inline u8 toBCD(u8 x) +{ + return ((x / 10) << 4) | (x % 10); +} bool moviemode=false;