From: Stefan Reinauer Date: Mon, 1 Jun 2026 20:39:20 +0000 (-0700) Subject: pcem: fit graphics sources into C++ builds X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=48dbe22e3242ff847c0f5523e42db4e328212193;p=francis%2Fwinuae.git pcem: fit graphics sources into C++ builds WinUAE builds the imported PCem graphics sources as C++ files. The MGA source includes C atomics directly, and the BT482 RAMDAC source uses C allocation declarations through C++ headers. Use C++ atomics when compiling MGA as C++, and include the C++ cstdlib wrapper where the BT482 RAMDAC needs those declarations. --- diff --git a/pcem/vid_bt482_ramdac.cpp b/pcem/vid_bt482_ramdac.cpp index 9c4d8264..1737acec 100644 --- a/pcem/vid_bt482_ramdac.cpp +++ b/pcem/vid_bt482_ramdac.cpp @@ -2,6 +2,7 @@ /* BT482 RAMDAC (based on 86box BT484) */ #include +#include #include "ibm.h" #include "mem.h" #include "device.h" diff --git a/pcem/vid_mga.cpp b/pcem/vid_mga.cpp index 891b1d8d..329f8bc2 100644 --- a/pcem/vid_mga.cpp +++ b/pcem/vid_mga.cpp @@ -20,7 +20,14 @@ #include #include #include +#ifdef __cplusplus +#include +using std::atomic_bool; +using std::atomic_int; +using std::atomic_uint; +#else #include +#endif #include "ibm.h" #include "device.h" #include "io.h"