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 <ColleagueRiley@gmail.com>
This commit is contained in:
Colleague Riley
2024-05-07 14:30:52 -04:00
committed by GitHub
parent fa2b1c8f09
commit 9805fe0b1a
5 changed files with 7948 additions and 7 deletions

View File

@@ -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)