Skip to content

Commit 0037ee5

Browse files
committed
2 parents 2569539 + 1e2fd94 commit 0037ee5

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ include(CompilerFlags)
3737
# Registers build options that are exposed to cmake
3838
include(CMakeOptions.txt)
3939

40-
if (UNIX AND NOT APPLE)
40+
if (UNIX AND NOT APPLE AND NOT "${PLATFORM}" MATCHES "DRM")
4141
if (NOT GLFW_BUILD_WAYLAND AND NOT GLFW_BUILD_X11)
4242
MESSAGE(FATAL_ERROR "Cannot disable both Wayland and X11")
4343
endif()

src/rcore.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,10 @@
165165
#ifndef MAX_PATH
166166
#define MAX_PATH 1025
167167
#endif
168-
__declspec(dllimport) unsigned long __stdcall GetModuleFileNameA(void *hModule, void *lpFilename, unsigned long nSize);
169-
__declspec(dllimport) unsigned long __stdcall GetModuleFileNameW(void *hModule, void *lpFilename, unsigned long nSize);
170-
__declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, void *widestr, int cchwide, void *str, int cbmb, void *defchar, int *used_default);
168+
struct HINSTANCE__;
169+
__declspec(dllimport) unsigned long __stdcall GetModuleFileNameA(struct HINSTANCE__ *hModule, char *lpFilename, unsigned long nSize);
170+
__declspec(dllimport) unsigned long __stdcall GetModuleFileNameW(struct HINSTANCE__ *hModule, wchar_t *lpFilename, unsigned long nSize);
171+
__declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, const wchar_t *widestr, int cchwide, char *str, int cbmb, const char *defchar, int *used_default);
171172
__declspec(dllimport) unsigned int __stdcall timeBeginPeriod(unsigned int uPeriod);
172173
__declspec(dllimport) unsigned int __stdcall timeEndPeriod(unsigned int uPeriod);
173174
#elif defined(__linux__)
@@ -511,7 +512,7 @@ static void RecordAutomationEvent(void); // Record frame events (to internal eve
511512

512513
#if defined(_WIN32) && !defined(PLATFORM_DESKTOP_RGFW)
513514
// NOTE: We declare Sleep() function symbol to avoid including windows.h (kernel32.lib linkage required)
514-
void __stdcall Sleep(unsigned long msTimeout); // Required for: WaitTime()
515+
__declspec(dllimport) void __stdcall Sleep(unsigned long msTimeout); // Required for: WaitTime()
515516
#endif
516517

517518
#if !defined(SUPPORT_MODULE_RTEXT)

0 commit comments

Comments
 (0)