From: Stefan Reinauer Date: Fri, 5 Jun 2026 04:41:16 +0000 (-0700) Subject: target: share WinUAE build date with Unix X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=5b9383b7d7d596bf2948c2371e92400a7a6cd277;p=francis%2Fwinuae.git target: share WinUAE build date with Unix The Unix target date was copied as a separate literal and had already drifted from the date used by the Windows version macros. Move the date macros to a small shared header and have both targets read the same value. --- diff --git a/include/winuae_builddate.h b/include/winuae_builddate.h new file mode 100644 index 00000000..cc3c5f48 --- /dev/null +++ b/include/winuae_builddate.h @@ -0,0 +1,11 @@ +#ifndef UAE_WINUAE_BUILDDATE_H +#define UAE_WINUAE_BUILDDATE_H + +#define MAKEBD(x,y,z) ((((x) - 2000) * 10000 + (y)) * 100 + (z)) +#define GETBDY(x) ((x) / 1000000 + 2000) +#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100) +#define GETBDD(x) ((x) % 100) + +#define WINUAEDATE MAKEBD(2026, 6, 11) + +#endif diff --git a/od-unix/config.cpp b/od-unix/config.cpp index 9248147d..40d51ca8 100644 --- a/od-unix/config.cpp +++ b/od-unix/config.cpp @@ -17,6 +17,7 @@ static int unix_avi_audio_codec = AVIAUDIO_AVI; #include "savestate.h" #include "sound_unix.h" #include "uaeserial_unix.h" +#include "winuae_builddate.h" #ifdef WITH_MIDI #include "midi.h" #endif @@ -793,7 +794,7 @@ void fetch_videopath(TCHAR *out, int size) { fetch_user_data_path_override(out, void target_getdate(int *y, int *m, int *d) { - *y = 2026; - *m = 5; - *d = 10; + *y = GETBDY(WINUAEDATE); + *m = GETBDM(WINUAEDATE); + *d = GETBDD(WINUAEDATE); } diff --git a/od-win32/win32.h b/od-win32/win32.h index a8c886a1..c1b00659 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -10,10 +10,7 @@ #ifndef __WIN32_H__ #define __WIN32_H__ -#define MAKEBD(x,y,z) ((((x) - 2000) * 10000 + (y)) * 100 + (z)) -#define GETBDY(x) ((x) / 1000000 + 2000) -#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100) -#define GETBDD(x) ((x) % 100) +#include "winuae_builddate.h" #define WINUAEPUBLICBETA 1 #define LANG_DLL 1 @@ -25,8 +22,6 @@ #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2026, 6, 11) - //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition")