From 27e7d44dda919de508dd3371a27565a8da9d57a4 Mon Sep 17 00:00:00 2001 From: Hugh Sanderson Date: Fri, 20 Sep 2024 20:40:15 +0800 Subject: [PATCH] Move nmeRender to ExternalIntrface.cpp --- project/src/common/ExternalInterface.cpp | 3 ++- project/src/opengl/OGLShaders.cpp | 1 - project/src/sdl2/SDL2Stage.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project/src/common/ExternalInterface.cpp b/project/src/common/ExternalInterface.cpp index 5b31d959c..54c31987c 100644 --- a/project/src/common/ExternalInterface.cpp +++ b/project/src/common/ExternalInterface.cpp @@ -58,6 +58,7 @@ void InitCamera(); void GetGLStats(int *statsArray, int n); extern bool gRespectExifOrientation; + // Not static int _id_id=0; @@ -744,6 +745,7 @@ DEFINE_PRIME2(nme_##obj_prefix##_set_##prop) using namespace nme; +std::string nmeRenderer; double nme_time_stamp() { @@ -808,7 +810,6 @@ void nme_set_renderer(HxString inRenderer) nmeEglMode = false; #endif #ifdef NME_SDL3 - extern std::string nmeRenderer; nmeRenderer = inRenderer.c_str(); #endif } diff --git a/project/src/opengl/OGLShaders.cpp b/project/src/opengl/OGLShaders.cpp index 29e6b66de..38350aa12 100644 --- a/project/src/opengl/OGLShaders.cpp +++ b/project/src/opengl/OGLShaders.cpp @@ -44,7 +44,6 @@ GLuint OGLProg::createShader(GLuint inType, const char *inShader) if (shader==0) { ELOG("Error in glCreateShader : %d\n", glGetError() ); - *(int *)0=0; return 0; } diff --git a/project/src/sdl2/SDL2Stage.cpp b/project/src/sdl2/SDL2Stage.cpp index 909bf7fd5..0937154cf 100644 --- a/project/src/sdl2/SDL2Stage.cpp +++ b/project/src/sdl2/SDL2Stage.cpp @@ -55,7 +55,7 @@ SDL_Surface *SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth typedef float MousePosType; -std::string nmeRenderer; +extern std::string nmeRenderer; #else typedef int MousePosType;