From 1f73c19a730338bf0d17f762840ad06953595654 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 26 Sep 2025 09:37:04 -0700 Subject: [PATCH] Added stub SDL_TimeToDateTime() for N-Gage Fixes https://github.com/libsdl-org/SDL/issues/14047 --- src/time/ngage/SDL_systime.cpp | 20 ++++++++++++++++++++ src/time/ps2/SDL_systime.c | 1 + 2 files changed, 21 insertions(+) diff --git a/src/time/ngage/SDL_systime.cpp b/src/time/ngage/SDL_systime.cpp index 952912b4b7..44bcd23e8b 100644 --- a/src/time/ngage/SDL_systime.cpp +++ b/src/time/ngage/SDL_systime.cpp @@ -169,6 +169,26 @@ bool SDL_GetCurrentTime(SDL_Time *ticks) return true; } +bool SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime *dt, bool localTime) +{ + CHECK_PARAM(!dt) { + return SDL_InvalidParamError("dt"); + } + + // FIXME: Need implementation + dt->year = 1970; + dt->month = 1; + dt->day = 1; + dt->hour = 0; + dt->minute = 0; + dt->second = 0; + dt->nanosecond = 0; + dt->day_of_week = 4; + dt->utc_offset = 0; + + return true; +} + static TTime UnixEpoch() { _LIT(KUnixEpoch, "19700101:000000.000000"); diff --git a/src/time/ps2/SDL_systime.c b/src/time/ps2/SDL_systime.c index 319e1e24f7..fcb28ee6c1 100644 --- a/src/time/ps2/SDL_systime.c +++ b/src/time/ps2/SDL_systime.c @@ -49,6 +49,7 @@ bool SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime *dt, bool localTime) return SDL_InvalidParamError("dt"); } + // FIXME: Need implementation dt->year = 1970; dt->month = 1; dt->day = 1;