Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(rcore_desktop_rgfw.c) fix errors when compiling with mingw #4282

Merged
merged 2 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/external/RGFW.h
Original file line number Diff line number Diff line change
Expand Up @@ -4999,7 +4999,9 @@ static const struct wl_callback_listener wl_surface_frame_listener = {
#define WIN32_LEAN_AND_MEAN
#define OEMRESOURCE
#include <windows.h>


__declspec(dllimport) int __stdcall WideCharToMultiByte( UINT CodePage, DWORD dwFlags, const WCHAR* lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, LPCCH lpDefaultChar, LPBOOL lpUsedDefaultChar);

#include <processthreadsapi.h>
#include <wchar.h>
#include <locale.h>
Expand Down
6 changes: 1 addition & 5 deletions src/platforms/rcore_desktop_rgfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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
}

Expand Down
Loading