From: Patrick Porlan Date: Wed, 24 Jul 2013 09:39:33 +0000 (+0200) Subject: Fix crash in GL ES 1.1 cube sample following qemu 1.5 update X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~882 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=026334ac4bd37e28b46dd2d017463ab19a34cd2e;p=sdk%2Femulator%2Fqemu.git Fix crash in GL ES 1.1 cube sample following qemu 1.5 update --- diff --git a/tizen/src/hw/opengl_exec.c b/tizen/src/hw/opengl_exec.c index c4ac435bcf..43e064ed5a 100644 --- a/tizen/src/hw/opengl_exec.c +++ b/tizen/src/hw/opengl_exec.c @@ -116,6 +116,12 @@ void g_free(void *ptr); /*#define glGetError() 0*/ +#ifdef WIN32 +# define CCONV __stdcall +#else +# define CCONV +#endif + #define GET_EXT_PTR(type, funcname, args_decl) \ static int detect_##funcname = 0; \ static type(*ptr_func_##funcname)args_decl = NULL; \ @@ -128,11 +134,11 @@ void g_free(void *ptr); #define GET_EXT_PTR_NO_FAIL(type, funcname, args_decl) \ static int detect_##funcname = 0; \ - static type(*ptr_func_##funcname)args_decl = NULL; \ + static type(CCONV *ptr_func_##funcname)args_decl = NULL; \ if (detect_##funcname == 0) \ { \ detect_##funcname = 1; \ - ptr_func_##funcname = (type(*)args_decl)glo_getprocaddress((const char*)#funcname); \ + ptr_func_##funcname = (type(CCONV *)args_decl)glo_getprocaddress((const char*)#funcname); \ } #ifndef WIN32 @@ -1987,7 +1993,7 @@ int do_function_call(ProcessState *process, int func_number, unsigned long *args { // if (display_function_call) //DEBUGF( "glXGetProcAddress %s ", (char *) args[0]); - ret.i = glo_getprocaddress((const char *) args[0]) != NULL; + // ret.i = glo_getprocaddress((const char *) args[0]) != NULL; // DEBUGF( " == %08x\n", ret.i); ret.i = 0; break;