diff options
| author | Ray <[email protected]> | 2023-10-19 13:36:10 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2023-10-19 13:36:10 +0200 |
| commit | 982641228c6ee5732ae99a9c26895305143b21d9 (patch) | |
| tree | 3f67472c97be5f8af36cd28298ddf880f41c8b8c /src/rcore.c | |
| parent | a64d606cb3aa55df0f01f75b8db0ca6b9a06b562 (diff) | |
| download | raylib-982641228c6ee5732ae99a9c26895305143b21d9.tar.gz raylib-982641228c6ee5732ae99a9c26895305143b21d9.zip | |
REDESIGNED: Move platforms to separate directory #3313
Diffstat (limited to 'src/rcore.c')
| -rw-r--r-- | src/rcore.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/src/rcore.c b/src/rcore.c index c6770a5b..fd0335c6 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -281,8 +281,8 @@ extern void LoadFontDefault(void); // [Module: text] Loads default font on extern void UnloadFontDefault(void); // [Module: text] Unloads default font from GPU memory #endif -static int InitPlatform(void); // Initialize platform (graphics, inputs and more) -static void ClosePlatform(void); // Close platform +extern int InitPlatform(void); // Initialize platform (graphics, inputs and more) +extern void ClosePlatform(void); // Close platform static void InitTimer(void); // Initialize timer (hi-resolution if available) static void SetupFramebuffer(int width, int height); // Setup main framebuffer @@ -309,15 +309,15 @@ const char *TextFormat(const char *text, ...); // Formatting of text with // Include platform-specific submodules #if defined(PLATFORM_DESKTOP) - #include "rcore_desktop.c" + #include "platforms/rcore_desktop.c" #elif defined(PLATFORM_DESKTOP_SDL) - #include "rcore_desktop_sdl.c" + #include "platforms/rcore_desktop_sdl.c" #elif defined(PLATFORM_WEB) - #include "rcore_web.c" + #include "platforms/rcore_web.c" #elif defined(PLATFORM_DRM) - #include "rcore_drm.c" + #include "platforms/rcore_drm.c" #elif defined(PLATFORM_ANDROID) - #include "rcore_android.c" + #include "platforms/rcore_android.c" #else // TODO: Include your custom platform backend! // i.e software rendering backend or console backend! @@ -328,8 +328,6 @@ const char *TextFormat(const char *text, ...); // Formatting of text with //---------------------------------------------------------------------------------- // NOTE: Functions with a platform-specific implementation on rcore_<platform>.c -//void InitWindow(int width, int height, const char *title) -//void CloseWindow(void) //bool WindowShouldClose(void) //void ToggleFullscreen(void) //void ToggleBorderlessWindowed(void) @@ -378,6 +376,22 @@ void InitWindow(int width, int height, const char *title) { TRACELOG(LOG_INFO, "Initializing raylib %s", RAYLIB_VERSION); +#if defined(PLATFORM_DESKTOP) + TRACELOG(LOG_INFO, "Platform backend: DESKTOP (GLFW)"); +#elif defined(PLATFORM_DESKTOP_SDL) + TRACELOG(LOG_INFO, "Platform backend: DESKTOP (SDL)"); +#elif defined(PLATFORM_WEB) + TRACELOG(LOG_INFO, "Platform backend: WEB (HTML5)"); +#elif defined(PLATFORM_DRM) + TRACELOG(LOG_INFO, "Platform backend: NATIVE DRM"); +#elif defined(PLATFORM_ANDROID) + TRACELOG(LOG_INFO, "Platform backend: ANDROID"); +#else + // TODO: Include your custom platform backend! + // i.e software rendering backend or console backend! + TRACELOG(LOG_INFO, "Platform backend: CUSTOM"); +#endif + TRACELOG(LOG_INFO, "Supported raylib modules:"); TRACELOG(LOG_INFO, " > rcore:..... loaded (mandatory)"); TRACELOG(LOG_INFO, " > rlgl:...... loaded (mandatory)"); |
