From 7bcfb2e75af100f9c070f966916072e9021ad147 Mon Sep 17 00:00:00 2001 From: ZIlko Date: Fri, 10 Jan 2025 18:56:53 -0600 Subject: [PATCH] 2.3.2 --- changelog.md | 6 ++++++ mod.json | 2 +- src/global.cpp | 5 +++++ src/macro.hpp | 2 +- src/ui/load_macro_layer.cpp | 6 ++++-- src/ui/record_layer.cpp | 1 - 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/changelog.md b/changelog.md index 4bc6085..0a1e08e 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,9 @@ +# v2.3.2 + +* Fixed android default render codec. +* Fixed android width input length being limited to 3. +* Fixed macros folder not creating automatically if not found. + # v2.3.1 * Fixed renders folder not creating automatically if not found. diff --git a/mod.json b/mod.json index fc0d5b1..0919d17 100644 --- a/mod.json +++ b/mod.json @@ -4,7 +4,7 @@ "win": "2.2074", "android": "2.2074" }, - "version": "2.3.1", + "version": "2.3.2", "id": "zilko.xdbot", "name": "xdBot", "developer": "Zilko", diff --git a/src/global.cpp b/src/global.cpp index 92eef6e..557072d 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -338,6 +338,11 @@ PauseLayer* Global::getPauseLayer() { $execute{ auto & g = Global::get(); + #ifdef GEODE_IS_ANDROID + if (!g.mod->setSavedValue("defaults_set_11", true)) + g.mod->setSavedValue("render_codec", std::string("libx264")); + #endif + if (!g.mod->setSavedValue("defaults_set_10", true)) { g.mod->setSettingValue("restore_page", true); diff --git a/src/macro.hpp b/src/macro.hpp index 439a76b..f28c8f7 100644 --- a/src/macro.hpp +++ b/src/macro.hpp @@ -17,7 +17,7 @@ const std::vector safeValues = { 1.0f / 5, 1.0f / 4, 1.0f / 3, 1.0f / 2 }; -const std::string xdBotVersion = "v2.3.1"; +const std::string xdBotVersion = "v2.3.2"; enum state { none, diff --git a/src/ui/load_macro_layer.cpp b/src/ui/load_macro_layer.cpp index 970f3e4..fcda65a 100644 --- a/src/ui/load_macro_layer.cpp +++ b/src/ui/load_macro_layer.cpp @@ -29,13 +29,15 @@ void LoadMacroLayer::open(geode::Popup<>* layer, geode::Popup<>* layer2, bool au std::filesystem::path path = Mod::get()->getSettingValue("macros_folder"); if (!std::filesystem::exists(path)) { - return FLAlertLayer::create("Error", "There was an error getting the folder. ID: 6", "Ok")->show(); + if (!std::filesystem::create_directory(path)) + return FLAlertLayer::create("Error", "There was an error getting the folder. ID: 6", "Ok")->show(); } path = Mod::get()->getSettingValue("autosaves_folder"); if (!std::filesystem::exists(path)) { - return FLAlertLayer::create("Error", "There was an error getting the folder. ID: 61", "Ok")->show(); + if (!std::filesystem::create_directory(path)) + return FLAlertLayer::create("Error", "There was an error getting the folder. ID: 61", "Ok")->show(); } LoadMacroLayer* layerReal = create(layer, layer2, autosaves); diff --git a/src/ui/record_layer.cpp b/src/ui/record_layer.cpp index 09483f4..9e846ed 100644 --- a/src/ui/record_layer.cpp +++ b/src/ui/record_layer.cpp @@ -779,7 +779,6 @@ bool RecordLayer::setup() { widthInput->setMouseEnabled(true); widthInput->setContentSize({ 60, 20 }); widthInput->setTouchEnabled(true); - widthInput->setMaxLabelLength(4); widthInput->setAllowedChars("0123456789"); widthInput->setString(mod->getSavedValue("render_width2").c_str()); widthInput->setDelegate(this);