mirror of https://github.com/raysan5/raylib
(rcore_desktop_rgfw.c) fix errors when compiling with mingw (#4282)
* (rcore_desktop_rgfw.c) fix errors when compiling with mingw * define WideCharToMultiByte
This commit is contained in:
parent
dfd8055270
commit
bc0bd98763
|
@ -5000,6 +5000,8 @@ static const struct wl_callback_listener wl_surface_frame_listener = {
|
||||||
#define OEMRESOURCE
|
#define OEMRESOURCE
|
||||||
#include <windows.h>
|
#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 <processthreadsapi.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
|
@ -76,9 +76,7 @@ void CloseWindow(void);
|
||||||
#define Size NSSIZE
|
#define Size NSSIZE
|
||||||
#endif
|
#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);
|
__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"
|
#include "../external/RGFW.h"
|
||||||
|
|
||||||
|
@ -538,10 +536,8 @@ void *GetWindowHandle(void)
|
||||||
{
|
{
|
||||||
#ifdef RGFW_WEBASM
|
#ifdef RGFW_WEBASM
|
||||||
return (void*)platform.window->src.ctx;
|
return (void*)platform.window->src.ctx;
|
||||||
#elif !defined(RGFW_WINDOWS)
|
|
||||||
return (void *)platform.window->src.window;
|
|
||||||
#else
|
#else
|
||||||
return platform.window->src.hwnd;
|
return (void*)platform.window->src.window;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue