浏览代码

Forgot to change key parameter to correct value

IceCryptonym 6 年之前
父节点
当前提交
52fc0ffbac
共有 2 个文件被更改,包括 5 次插入 和 2 次删除
  1. 2 2
      src/WallpaperEngine/Core/CProject.cpp
  2. 3 0
      src/WallpaperEngine/FileSystem/FileSystem.cpp

+ 2 - 2
src/WallpaperEngine/Core/CProject.cpp

@@ -19,8 +19,8 @@ CProject* CProject::fromFile (const irr::io::path& filename)
     json content = json::parse (WallpaperEngine::FileSystem::loadFullFile (filename));
 
     auto title = jsonFindRequired (&content, "title", "Project title missing");
-    auto type = jsonFindRequired (&content, "title", "Project type missing");
-    auto file = jsonFindRequired (&content, "title", "Project's main file missing");
+    auto type = jsonFindRequired (&content, "type", "Project type missing");
+    auto file = jsonFindRequired (&content, "file", "Project's main file missing");
     auto general = content.find ("general");
 
     CProject* project = new CProject (

+ 3 - 0
src/WallpaperEngine/FileSystem/FileSystem.cpp

@@ -1,6 +1,8 @@
 // filesystem includes
 #include "FileSystem.h"
 
+#include <iostream>
+
 // engine includes
 #include "WallpaperEngine/Irrlicht/CContext.h"
 
@@ -10,6 +12,7 @@ using namespace WallpaperEngine;
 
 std::string FileSystem::loadFullFile (const irr::io::path& file)
 {
+    std::cout << file.c_str() << std::endl;
     irr::io::IReadFile* reader = IrrlichtContext->getDevice ()->getFileSystem ()->createAndOpenFile (file);
 
     if (reader == nullptr)