mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
SCI: Fix kGetTime 12-hour formatting
SSCI sets hours 0 and 12 to 12, not 0. Fixes clock display in Hoyle4 and Hoyle5.
This commit is contained in:
parent
7095ed66c5
commit
518226146d
@ -260,7 +260,11 @@ reg_t kGetTime(EngineState *s, int argc, reg_t *argv) {
|
||||
debugC(kDebugLevelTime, "GetTime(elapsed) returns %d", retval);
|
||||
break;
|
||||
case KGETTIME_TIME_12HOUR :
|
||||
retval = ((loc_time.tm_hour % 12) << 12) | (loc_time.tm_min << 6) | (loc_time.tm_sec);
|
||||
loc_time.tm_hour %= 12;
|
||||
if (loc_time.tm_hour == 0) {
|
||||
loc_time.tm_hour = 12;
|
||||
}
|
||||
retval = (loc_time.tm_hour << 12) | (loc_time.tm_min << 6) | (loc_time.tm_sec);
|
||||
debugC(kDebugLevelTime, "GetTime(12h) returns %d", retval);
|
||||
break;
|
||||
case KGETTIME_TIME_24HOUR :
|
||||
|
Loading…
Reference in New Issue
Block a user