From 228a69883969edc1b31273e886c08d5537f7436b Mon Sep 17 00:00:00 2001 From: DepressedTWM Date: Tue, 28 Jul 2026 10:47:16 +0400 Subject: [PATCH] Gast fix --- CMakeLists.txt | 6 +----- README.md | 8 +++++--- binding-mri/module_rpg1.rb | 13 ++++++++++++- changelogs/0.1.2.txt | 2 ++ scripts/Main.rb | 2 ++ src/modloader.cpp | 11 ++++++----- 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index edf97a6..9e368c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -329,11 +329,7 @@ else() -frename-registers -ffunction-sections -fdata-sections - -fvisibility=hidden - -finline-functions #-fno-rtti - -fno-asynchronous-unwind-tables - -fno-unwind-tables - -s) + -fvisibility=hidden) add_link_options(-Wl,-O2 -Wl,--gc-sections diff --git a/README.md b/README.md index 2324669..d6caf3e 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Target of sunshine mod - improve original game. ## Build 1. Install required packages + * GCC 14+ * Cmake * C/C++ compiler * xxd @@ -24,9 +25,10 @@ Target of sunshine mod - improve original game. * PhysFS * sigc++-2.0 * OpenSSL - * libzip - * GTK3(Linux only!) - * libxfconf(Linux only!) + * GTK3(*NIX only!) + * libxfconf(*NIX only!) + +(*NIX - Linux,FreeBSD and other UNIX and UNIX-like systems.) 2. build * In project dir create build dir diff --git a/binding-mri/module_rpg1.rb b/binding-mri/module_rpg1.rb index e1f3f25..0b5a33e 100644 --- a/binding-mri/module_rpg1.rb +++ b/binding-mri/module_rpg1.rb @@ -17,7 +17,18 @@ module RPG module Cache @cache = {} def self.load_bitmap(folder_name, filename, hue = 0) - path = Graphics.adapted_file(folder_name + filename) + if ModLoader::IS_ENABLED + if File.exist?("/mod-storage/" + folder_name + filename) + print "test" + path = Graphics.adapted_file("/mod-storage/" + folder_name + filename) + else + print "test2" + path = Graphics.adapted_file(folder_name + filename) + end + else + print "test3" + path = Graphics.adapted_file(folder_name + filename) + end if not @cache.include?(path) or @cache[path].disposed? if filename != "" @cache[path] = Bitmap.new(path) diff --git a/changelogs/0.1.2.txt b/changelogs/0.1.2.txt index 4b6796d..679c0f4 100644 --- a/changelogs/0.1.2.txt +++ b/changelogs/0.1.2.txt @@ -11,3 +11,5 @@ Added help screen in Settings Fixed language selection Replaced Japanese font with pixel one Added SDL_HINT_INVALID_PARAM_CHECKS controller in Settings>Advanced +Added "Stream Privacy" +Added a change to sub categories in the settings diff --git a/scripts/Main.rb b/scripts/Main.rb index 04df541..6cfd1ac 100644 --- a/scripts/Main.rb +++ b/scripts/Main.rb @@ -23,6 +23,8 @@ begin #debug shit Input.set_led(255, 150, 30) + print Dir.entries(".") + # Load persistent data Persistent.load diff --git a/src/modloader.cpp b/src/modloader.cpp index 0fd9a9f..b641ffe 100644 --- a/src/modloader.cpp +++ b/src/modloader.cpp @@ -73,12 +73,14 @@ std::string sha256_file(const std::string &fn) { void ModLoader(){ std::string path = "mods"; - if (!fs::exists(path) || !std::filesystem::is_directory(path)) { + if (!fs::exists(path) || !fs::is_directory(path)) { Debug() << "[MODLOADER] Mods directory not found, skip."; + return; } if (fs::is_empty(path)){ Debug() << "[MODLOADER] Mods directory empty, skip."; + return; } //buildID - unique ID of a certain combination of mods @@ -87,14 +89,14 @@ void ModLoader(){ std::vector mod_list = {}; try{ //1.check if any zip(mod) file, 2. calculate sha256 hash of zip(mod) files 3.mount mod via PhysFS - for (const auto &entry : std::filesystem::directory_iterator(path, std::filesystem::directory_options::skip_permission_denied)) { + for (const auto &entry : fs::directory_iterator(path, fs::directory_options::skip_permission_denied)) { std::error_code ec; auto p = entry.path(); - if (!std::filesystem::is_regular_file(p, ec) || ec) continue; + if (!fs::is_regular_file(p, ec) || ec) continue; auto ext = p.extension().string(); if (ext != ".zip") continue; std::string full = p.string(); - int ok = PHYSFS_mount(full.c_str(), "/", 0); + int ok = PHYSFS_mount(full.c_str(), "/mod-storage", 0); if (!ok) { crash(Exception::ModLoaderError, "PhysFS_mount failed: %s", PHYSFS_getLastError()); } @@ -108,7 +110,6 @@ void ModLoader(){ buildID = sha512(buildID_tmp); Debug() << "[MODLOADER] BuildID: " << buildID; - modloader_is_enabled = true; }catch(const std::exception& e){ crash(Exception::ModLoaderError, "Something is wrong, Exception: %s ", e.what());