From f56db9b48b55a69eb47bfb6b744fef93c5c3ff0a Mon Sep 17 00:00:00 2001 From: KiritoDev Date: Sat, 22 May 2021 11:46:00 -0500 Subject: [PATCH] Fixed texture loading on windows and switch --- src/moon/zip/straw.cpp | 12 ++---------- src/pc/pc_main.c | 1 - 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/moon/zip/straw.cpp b/src/moon/zip/straw.cpp index d7fe88b8..5095d8e2 100644 --- a/src/moon/zip/straw.cpp +++ b/src/moon/zip/straw.cpp @@ -10,12 +10,7 @@ using namespace std; using namespace miniz_cpp; bool isDirectory; - -#ifdef __MINGW32__ -#define SEPARATOR "\\" -#else #define SEPARATOR "/" -#endif zip_file zipFile; @@ -32,11 +27,8 @@ vector StrawFile::entries(){ if(isDirectory) { vector fileList; for (auto & entry : fs::recursive_directory_iterator(this->path)){ - #ifndef TARGET_SWITCH - fileList.push_back(fs::relative(entry, this->path).string()); - #else - fileList.push_back(entry.path().string()); - #endif + string path = entry.path().string(); + fileList.push_back(path.substr(path.find(this->path) + this->path.length() + 1)); } return fileList; } diff --git a/src/pc/pc_main.c b/src/pc/pc_main.c index 4da7d8d2..7e8b08d9 100644 --- a/src/pc/pc_main.c +++ b/src/pc/pc_main.c @@ -250,7 +250,6 @@ void main_func(char *argv[]) { thread5_game_loop(NULL); inited = true; - fprintf(stdout, "precaching data\n"); fflush(stdout); gfx_precache_textures(); moon_setup("PreInit");