diff options
| author | Colleague Riley <[email protected]> | 2024-05-07 14:30:52 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-07 20:30:52 +0200 |
| commit | 9805fe0b1afe8a25a5c7be92468a58bc2fbf8e4a (patch) | |
| tree | 9ffcdcf6389d9593a6ad00c47b0b96c558236916 /src/rcore.c | |
| parent | fa2b1c8f094db18466079fcd2f8e488bf89095c2 (diff) | |
| download | raylib-9805fe0b1afe8a25a5c7be92468a58bc2fbf8e4a.tar.gz raylib-9805fe0b1afe8a25a5c7be92468a58bc2fbf8e4a.zip | |
make RGFW a custom platform (#3941)
* fix minor bugs and errors (x86) for the RGFW platform, update RGFW platform license, update makefile info for RGFW platform
* revert
* (RGFW) (winapi) fix mouse hide bug when cursor changes
* ensure PLATFORM_SHELL is defined (PLATFORM_RGFW)
---------
Co-authored-by: ColleagueRiley <[email protected]>
Diffstat (limited to 'src/rcore.c')
| -rw-r--r-- | src/rcore.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rcore.c b/src/rcore.c index b229589f..1db86518 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -154,13 +154,15 @@ #endif // Platform specific defines to handle GetApplicationDirectory() -#if defined(_WIN32) +#if (defined(_WIN32) && !defined(PLATFORM_DESKTOP_RGFW)) || (defined(_MSC_VER) && defined(PLATFORM_DESKTOP_RGFW)) #ifndef MAX_PATH #define MAX_PATH 1025 #endif __declspec(dllimport) unsigned long __stdcall GetModuleFileNameA(void *hModule, void *lpFilename, unsigned long nSize); __declspec(dllimport) unsigned long __stdcall GetModuleFileNameW(void *hModule, void *lpFilename, unsigned long nSize); __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, void *widestr, int cchwide, void *str, int cbmb, void *defchar, int *used_default); +unsigned int __stdcall timeBeginPeriod(unsigned int uPeriod); +unsigned int __stdcall timeEndPeriod(unsigned int uPeriod); #elif defined(__linux__) #include <unistd.h> #elif defined(__APPLE__) @@ -482,7 +484,7 @@ static void ScanDirectoryFilesRecursively(const char *basePath, FilePathList *li static void RecordAutomationEvent(void); // Record frame events (to internal events array) #endif -#if defined(_WIN32) +#if defined(_WIN32) && !defined(PLATFORM_DESKTOP_RGFW) // NOTE: We declare Sleep() function symbol to avoid including windows.h (kernel32.lib linkage required) void __stdcall Sleep(unsigned long msTimeout); // Required for: WaitTime() #endif @@ -496,6 +498,8 @@ const char *TextFormat(const char *text, ...); // Formatting of tex #include "platforms/rcore_desktop.c" #elif defined(PLATFORM_DESKTOP_SDL) #include "platforms/rcore_desktop_sdl.c" +#elif defined(PLATFORM_DESKTOP_RGFW) + #include "platforms/rcore_desktop_rgfw.c" #elif defined(PLATFORM_WEB) #include "platforms/rcore_web.c" #elif defined(PLATFORM_DRM) |
