Skip to content

Commit

Permalink
2.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiLko committed Jan 11, 2025
1 parent f49e5e6 commit 7bcfb2e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions src/global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/macro.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const std::vector<float> 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,
Expand Down
6 changes: 4 additions & 2 deletions src/ui/load_macro_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ void LoadMacroLayer::open(geode::Popup<>* layer, geode::Popup<>* layer2, bool au
std::filesystem::path path = Mod::get()->getSettingValue<std::filesystem::path>("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<std::filesystem::path>("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);
Expand Down
1 change: 0 additions & 1 deletion src/ui/record_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string>("render_width2").c_str());
widthInput->setDelegate(this);
Expand Down

0 comments on commit 7bcfb2e

Please sign in to comment.