Browse Source

Merge pull request #299 from AtomicGameEngine/JME-ATOMIC-SMALLFIXES

Fixes
JoshEngebretson 10 years ago
parent
commit
4f353bc72e

+ 2 - 0
Source/AtomicEditor/Application/AEEditorApp.cpp

@@ -77,6 +77,8 @@ void AEEditorApp::Start()
 
 void AEEditorApp::Setup()
 {
+    AEEditorCommon::Setup();
+
     context_->SetEditorContext(true);
 
     ToolEnvironment* env = new ToolEnvironment(context_);

+ 4 - 0
Source/AtomicEditor/Application/AEPlayerApp.cpp

@@ -64,6 +64,8 @@ AEPlayerApplication::AEPlayerApplication(Context* context) :
 
 void AEPlayerApplication::Setup()
 {
+    AEEditorCommon::Setup();
+
     FileSystem* filesystem = GetSubsystem<FileSystem>();
 
     engineParameters_["WindowTitle"] = "AtomicPlayer";
@@ -85,6 +87,8 @@ void AEPlayerApplication::Setup()
     engineParameters_["WindowHeight"] = 720;
 #endif
 
+    engineParameters_["LogLevel"] = LOG_DEBUG;
+
 #if ATOMIC_PLATFORM_WINDOWS
     engineParameters_["WindowIcon"] = "Images/AtomicLogo32.png";
     engineParameters_["ResourcePrefixPath"] = "AtomicPlayer_Resources";

+ 5 - 0
Source/AtomicPlayer/Application/AtomicPlayer.cpp

@@ -61,6 +61,11 @@ AtomicPlayerApp::AtomicPlayerApp(Context* context) :
 
 void AtomicPlayerApp::Setup()
 {
+
+#ifdef ATOMIC_3D
+    RegisterEnvironmentLibrary(context_);
+#endif
+
     FileSystem* filesystem = GetSubsystem<FileSystem>();
 
     engineParameters_["WindowTitle"] = "AtomicPlayer";

+ 3 - 3
Source/ToolCore/Project/ProjectUserPrefs.cpp

@@ -34,7 +34,7 @@ bool ProjectUserPrefs::Load(const String& path)
     if (!result)
         return false;
 
-    JSONValue root = jsonFile->GetRoot();
+    JSONValue& root = jsonFile->GetRoot();
     if (!root.IsObject())
         return false;
 
@@ -48,11 +48,11 @@ void ProjectUserPrefs::Save(const String& path)
 
     SharedPtr<JSONFile> jsonFile(new JSONFile(context_));
 
-    JSONValue root = jsonFile->GetRoot();
+    JSONValue& root = jsonFile->GetRoot();
 
     SharedPtr<File> file(new File(context_, path, FILE_WRITE));
 
-    root.Set("lastBuildPath", JSONValue(lastBuildPath_));
+    root.Set("lastBuildPath", lastBuildPath_);
 
     jsonFile->Save(*file, String("   "));