mcst-linux-kernel/patches-2024.06.26/gl4es-1.1.4/0158-CC-in-header-for-WIN32...

49 lines
1.5 KiB
Diff

From 9ad8db3eab9aad24323120c637177325063886fb Mon Sep 17 00:00:00 2001
From: Iouri Kharon <bc-info@styx.cabel.net>
Date: Fri, 4 Jun 2021 14:25:20 +0300
Subject: [PATCH 158/233] CC in header (for WIN32)
---
include/gl4esinit.h | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/include/gl4esinit.h b/include/gl4esinit.h
index acda7948..79cbb344 100644
--- a/include/gl4esinit.h
+++ b/include/gl4esinit.h
@@ -2,20 +2,28 @@
#ifndef _GL4ESINCLUDE_INIT_H_
#define _GL4ESINCLUDE_INIT_H_
+#ifndef APIENTRY_GL4ES
+# if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
+# define APIENTRY_GL4ES __stdcall
+# else
+# define APIENTRY_GL4ES
+# endif
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
// set driver GetProcAddress implementation. required for hardext detection with NOEGL or when loader is disabled
-void set_getprocaddress(void *(*new_proc_address)(const char *));
+void set_getprocaddress(void *(APIENTRY_GL4ES *new_proc_address)(const char *));
// reguired with NOEGL
-void set_getmainfbsize(void (*new_getMainFBSize)(int* width, int* height));
+void set_getmainfbsize(void (APIENTRY_GL4ES *new_getMainFBSize)(int* width, int* height));
// do this before any GL calls if init constructors are disabled.
void initialize_gl4es(void);
// do this to uninitialize GL4ES if init constructors are disabled.
void close_gl4es(void);
// wrapped GetProcAddress
-void *gl4es_GetProcAddress(const char *name);
+void* APIENTRY_GL4ES gl4es_GetProcAddress(const char *name);
#ifdef __cplusplus
}
--
2.11.0