[cogl/cogl.msvc.new: 18/19] cogl-winsys-sdl2.c: Fix running on 32-bit Windows
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/cogl.msvc.new: 18/19] cogl-winsys-sdl2.c: Fix running on 32-bit Windows
- Date: Mon, 11 Feb 2019 10:12:17 +0000 (UTC)
commit 337d8af59805a677d49cc305dfffc393336680ab
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Feb 11 17:36:02 2019 +0800
cogl-winsys-sdl2.c: Fix running on 32-bit Windows
When we query for GL APIs, we need to ensure that we are using the
correct calling convention, otherwise running on 32-bit Windows will
crash.
cogl/winsys/cogl-winsys-sdl2.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/cogl/winsys/cogl-winsys-sdl2.c b/cogl/winsys/cogl-winsys-sdl2.c
index c6661d93..b9ae6b2b 100644
--- a/cogl/winsys/cogl-winsys-sdl2.c
+++ b/cogl/winsys/cogl-winsys-sdl2.c
@@ -48,6 +48,10 @@
#include "cogl-poll-private.h"
#include "cogl-sdl.h"
+#ifndef APIENTRY
+# define APIENTRY
+#endif
+
typedef struct _CoglContextSdl2
{
SDL_Window *current_window;
@@ -158,7 +162,7 @@ _cogl_winsys_display_setup (CoglDisplay *display,
CoglError **error)
{
CoglDisplaySdl2 *sdl_display;
- const char * (* get_string_func) (GLenum name);
+ const char * (APIENTRY * get_string_func) (GLenum name);
const char *gl_version;
_COGL_RETURN_VAL_IF_FAIL (display->winsys == NULL, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]