diff --git a/GDCpp/GDCpp/IDE/AndroidExporter.cpp b/GDCpp/GDCpp/IDE/AndroidExporter.cpp index 90c34ea097fc..bc98c6338784 100644 --- a/GDCpp/GDCpp/IDE/AndroidExporter.cpp +++ b/GDCpp/GDCpp/IDE/AndroidExporter.cpp @@ -110,7 +110,7 @@ bool AndroidExporter::ExportMainFile(gd::Project & project, gd::String outputDir gd::EventsCodeGenerator codeGenerator(project, layout, CppPlatform::Get()); layoutFunctionDeclarations += "extern \"C\" int " + layoutFunctionName + "(RuntimeContext * runtimeContext);\n"; - functionAssignmentCode += "\t\tif (scene->GetName() == \"" + + functionAssignmentCode += "\t\tif (scene.GetName() == \"" + codeGenerator.ConvertToString(layout.GetName()) + "\") function = &" + layoutFunctionName + ";\n"; } diff --git a/GDCpp/GDCpp/Runtime/CommonTools.h b/GDCpp/GDCpp/Runtime/CommonTools.h index 91cfe2bda860..5e856554990d 100644 --- a/GDCpp/GDCpp/Runtime/CommonTools.h +++ b/GDCpp/GDCpp/Runtime/CommonTools.h @@ -9,7 +9,6 @@ #include #include #include -#include #include "GDCpp/Runtime/String.h" #if defined(GD_IDE_ONLY) class wxString; diff --git a/GDCpp/GDCpp/Runtime/RuntimeScene.cpp b/GDCpp/GDCpp/Runtime/RuntimeScene.cpp index 047c17fc9d0f..46cf62af66bd 100644 --- a/GDCpp/GDCpp/Runtime/RuntimeScene.cpp +++ b/GDCpp/GDCpp/Runtime/RuntimeScene.cpp @@ -29,13 +29,15 @@ #include "GDCpp/Runtime/RuntimeContext.h" #include "GDCpp/Runtime/Project/Project.h" #include "GDCpp/Runtime/ManualTimer.h" -#include "GDCpp/Runtime/Tools/OpenGLTools.h" #include "GDCpp/Extensions/CppPlatform.h" #include "GDCore/Tools/Localization.h" #include "GDCore/Tools/Log.h" -#if !defined(ANDROID) && !defined(MACOS) +#if !defined(ANDROID) //TODO: OpenGL +#include "GDCpp/Runtime/Tools/OpenGLTools.h" +#if !defined(MACOS) #include #endif +#endif #include "GDCpp/Runtime/CodeExecutionEngine.h" #if defined(GD_IDE_ONLY) diff --git a/GDCpp/Runtime/Android/jni/main.cpp b/GDCpp/Runtime/Android/jni/main.cpp index 2bdc01387812..8212e2e62ad7 100644 --- a/GDCpp/Runtime/Android/jni/main.cpp +++ b/GDCpp/Runtime/Android/jni/main.cpp @@ -101,7 +101,7 @@ int main(int argc, char *argv[]) std::cout << error << std::endl; abort = true; }); - sceneStack.OnLoadScene([](std::shared_ptr scene) { + sceneStack.OnLoadScene([](RuntimeScene & scene) { int (*function)(RuntimeContext*) = nullptr; /* GDCPP_EVENTS_ASSIGNMENTS */