diff --git a/tools/emulator/opengl/host/libs/GLESv1_dec/GLDecoder.cpp b/tools/emulator/opengl/host/libs/GLESv1_dec/GLDecoder.cpp index e6ccbd981..5399445e0 100644 --- a/tools/emulator/opengl/host/libs/GLESv1_dec/GLDecoder.cpp +++ b/tools/emulator/opengl/host/libs/GLESv1_dec/GLDecoder.cpp @@ -38,7 +38,7 @@ GLDecoder::~GLDecoder() int GLDecoder::initGL(get_proc_func_t getProcFunc, void *getProcFuncData) { if (getProcFunc == NULL) { - char *libname = GLES_LIBNAME; + const char *libname = GLES_LIBNAME; if (getenv(GLES_LIBNAME_VAR) != NULL) { libname = getenv(GLES_LIBNAME_VAR); } diff --git a/tools/emulator/opengl/host/libs/Translator/EGL/EglWindowsApi.cpp b/tools/emulator/opengl/host/libs/Translator/EGL/EglWindowsApi.cpp index 4f8d4b439..0c6b0eef8 100644 --- a/tools/emulator/opengl/host/libs/Translator/EGL/EglWindowsApi.cpp +++ b/tools/emulator/opengl/host/libs/Translator/EGL/EglWindowsApi.cpp @@ -428,7 +428,8 @@ bool checkWindowPixelFormatMatch(EGLNativeInternalDisplayType dpy,EGLNativeWindo *width = r.right - r.left; *height = r.bottom - r.top; HDC dc = GetDC(win); - bool ret = SetPixelFormat(dc,cfg->nativeId(),&cfg->nativeConfig()); + EGLNativePixelFormatType nativeConfig = cfg->nativeConfig(); + bool ret = SetPixelFormat(dc,cfg->nativeId(),&nativeConfig); DeleteDC(dc); return ret; } @@ -495,7 +496,8 @@ EGLNativeContextType createContext(EGLNativeInternalDisplayType display,EglConfi HDC dpy = getDummyDC(display,cfg->nativeId()); if(!display->isPixelFormatSet(cfg->nativeId())){ - if(!SetPixelFormat(dpy,cfg->nativeId(),&cfg->nativeConfig())){ + EGLNativePixelFormatType nativeConfig = cfg->nativeConfig(); + if(!SetPixelFormat(dpy,cfg->nativeId(),&nativeConfig)){ return NULL; } display->pixelFormatWasSet(cfg->nativeId()); diff --git a/tools/emulator/opengl/host/tools/emugen/ApiGen.cpp b/tools/emulator/opengl/host/tools/emugen/ApiGen.cpp index 3df3107a9..113d13a00 100644 --- a/tools/emulator/opengl/host/tools/emugen/ApiGen.cpp +++ b/tools/emulator/opengl/host/tools/emugen/ApiGen.cpp @@ -542,7 +542,7 @@ int ApiGen::genDecoderHeader(const std::string &filename) classname.c_str(), m_basename.c_str(), sideString(SERVER_SIDE)); fprintf(fp, "\tsize_t decode(void *buf, size_t bufsize, IOStream *stream);\n"); fprintf(fp, "\n};\n\n"); - fprintf(fp, "#endif"); + fprintf(fp, "#endif\n"); fclose(fp); return 0;