From d4693a9093e14d76252a6c020677055c650fc888 Mon Sep 17 00:00:00 2001 From: TheSpydog Date: Sun, 14 Aug 2022 20:45:24 +0000 Subject: [PATCH] Prep for PS5Driver (#19) This PR contains the general changes needed for the PS5 driver (being developed separately, outside this repository). Co-authored-by: Caleb Cornett Reviewed-on: https://gitea.moonside.games/MoonsideGames/Refresh/pulls/19 Co-authored-by: TheSpydog Co-committed-by: TheSpydog --- src/Refresh.c | 5 +++++ src/Refresh_Driver.h | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/Refresh.c b/src/Refresh.c index e12c387..3261f4a 100644 --- a/src/Refresh.c +++ b/src/Refresh.c @@ -34,7 +34,12 @@ /* Drivers */ static const Refresh_Driver *drivers[] = { +#ifdef REFRESH_DRIVER_VULKAN &VulkanDriver, +#endif +#ifdef REFRESH_DRIVER_PS5 + &PS5Driver, +#endif NULL }; diff --git a/src/Refresh_Driver.h b/src/Refresh_Driver.h index 56d8ec6..a98e60a 100644 --- a/src/Refresh_Driver.h +++ b/src/Refresh_Driver.h @@ -36,9 +36,15 @@ /* Logging */ -extern void Refresh_LogInfo(const char *fmt, ...); -extern void Refresh_LogWarn(const char *fmt, ...); -extern void Refresh_LogError(const char *fmt, ...); +#ifdef __cplusplus +extern "C" { +#endif +void Refresh_LogInfo(const char *fmt, ...); +void Refresh_LogWarn(const char *fmt, ...); +void Refresh_LogError(const char *fmt, ...); +#ifdef __cplusplus +} +#endif /* Internal Helper Utilities */ @@ -525,6 +531,7 @@ typedef struct Refresh_Driver } Refresh_Driver; extern Refresh_Driver VulkanDriver; +extern Refresh_Driver PS5Driver; #endif /* REFRESH_DRIVER_H */