From 5dec091dea8089dc5cce73351c0dbabd48bfca71 Mon Sep 17 00:00:00 2001 From: ColleagueRiley Date: Sat, 24 Aug 2024 10:55:54 -0400 Subject: [PATCH 1/2] (rcore_desktop_rgfw.c) fix errors when compiling with mingw --- src/platforms/rcore_desktop_rgfw.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/platforms/rcore_desktop_rgfw.c b/src/platforms/rcore_desktop_rgfw.c index afea0c2e6f6a..64ab432e6c3e 100644 --- a/src/platforms/rcore_desktop_rgfw.c +++ b/src/platforms/rcore_desktop_rgfw.c @@ -76,9 +76,7 @@ void CloseWindow(void); #define Size NSSIZE #endif -#if defined(_MSC_VER) __declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int CodePage, unsigned long dwFlags, const char *lpMultiByteStr, int cbMultiByte, wchar_t *lpWideCharStr, int cchWideChar); -#endif #include "../external/RGFW.h" @@ -538,10 +536,8 @@ void *GetWindowHandle(void) { #ifdef RGFW_WEBASM return (void*)platform.window->src.ctx; -#elif !defined(RGFW_WINDOWS) - return (void *)platform.window->src.window; #else - return platform.window->src.hwnd; + return (void*)platform.window->src.window; #endif } From 46c1d60e051433ce64f00136a6d48b28a506ea3f Mon Sep 17 00:00:00 2001 From: ColleagueRiley Date: Sat, 24 Aug 2024 11:15:55 -0400 Subject: [PATCH 2/2] define WideCharToMultiByte --- src/external/RGFW.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/external/RGFW.h b/src/external/RGFW.h index 367a46fa608e..35e782d4ae2b 100644 --- a/src/external/RGFW.h +++ b/src/external/RGFW.h @@ -4999,7 +4999,9 @@ static const struct wl_callback_listener wl_surface_frame_listener = { #define WIN32_LEAN_AND_MEAN #define OEMRESOURCE #include - + + __declspec(dllimport) int __stdcall WideCharToMultiByte( UINT CodePage, DWORD dwFlags, const WCHAR* lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, LPCCH lpDefaultChar, LPBOOL lpUsedDefaultChar); + #include #include #include