Skip to content

Commit

Permalink
Fixes for Android SFML export
Browse files Browse the repository at this point in the history
  • Loading branch information
4ian committed Dec 21, 2016
1 parent 9f81038 commit 4dae5dd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion GDCpp/GDCpp/IDE/AndroidExporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down
1 change: 0 additions & 1 deletion GDCpp/GDCpp/Runtime/CommonTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <sstream>
#include <vector>
#include <cmath>
#include <SFML/System/String.hpp>
#include "GDCpp/Runtime/String.h"
#if defined(GD_IDE_ONLY)
class wxString;
Expand Down
6 changes: 4 additions & 2 deletions GDCpp/GDCpp/Runtime/RuntimeScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <GL/glu.h>
#endif
#endif

#include "GDCpp/Runtime/CodeExecutionEngine.h"
#if defined(GD_IDE_ONLY)
Expand Down
2 changes: 1 addition & 1 deletion GDCpp/Runtime/Android/jni/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ int main(int argc, char *argv[])
std::cout << error << std::endl;
abort = true;
});
sceneStack.OnLoadScene([](std::shared_ptr<RuntimeScene> scene) {
sceneStack.OnLoadScene([](RuntimeScene & scene) {
int (*function)(RuntimeContext*) = nullptr;
/* GDCPP_EVENTS_ASSIGNMENTS */

Expand Down

0 comments on commit 4dae5dd

Please sign in to comment.