Fix MSVC errors for PLATFORM_DESKTOP_RGFW (#4441)
* (rcore_desktop_rgfw.c) fix errors when compiling with mingw * define WideCharToMultiByte * update RGFW * move stdcall def to windows only * fix raw cursor input * Fix warnings, update RGFW, fix msvc errors (make sure windows macro _WIN32 is correct)
This commit is contained in:
parent
38cf9f3224
commit
7fe5f7126b
3 changed files with 49 additions and 21 deletions
|
|
@ -63,13 +63,16 @@ void CloseWindow(void);
|
|||
|
||||
#define RGFW_IMPLEMENTATION
|
||||
|
||||
#if defined(__WIN32) || defined(__WIN64)
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define Rectangle rectangle_win32
|
||||
#define Rectangle rectangle_win32
|
||||
#define CloseWindow CloseWindow_win32
|
||||
#define ShowCursor __imp_ShowCursor
|
||||
#define _APISETSTRING_
|
||||
__declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int CodePage, unsigned long dwFlags, const char *lpMultiByteStr, int cbMultiByte, wchar_t *lpWideCharStr, int cchWideChar);
|
||||
#define _APISETSTRING_
|
||||
|
||||
#undef MAX_PATH
|
||||
|
||||
__declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int CodePage, unsigned long dwFlags, const char *lpMultiByteStr, int cbMultiByte, wchar_t *lpWideCharStr, int cchWideChar);
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
|
|
@ -79,11 +82,14 @@ void CloseWindow(void);
|
|||
|
||||
#include "../external/RGFW.h"
|
||||
|
||||
#if defined(__WIN32) || defined(__WIN64)
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#undef DrawText
|
||||
#undef ShowCursor
|
||||
#undef CloseWindow
|
||||
#undef Rectangle
|
||||
|
||||
#undef MAX_PATH
|
||||
#define MAX_PATH 1025
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
|
|
|
|||
Loading…
Reference in a new issue