diff --git a/mod.json b/mod.json index 4bc15c6..1dd06e1 100644 --- a/mod.json +++ b/mod.json @@ -2,7 +2,8 @@ "geode": "4.0.1", "gd": { "win": "2.2074", - "android": "2.2074" + "android": "2.2074", + "mac": "2.2074" }, "version": "v2.1.3", "id": "zilko.xdbot", diff --git a/src/keybinds.cpp b/src/keybinds.cpp index 73917e0..126701d 100644 --- a/src/keybinds.cpp +++ b/src/keybinds.cpp @@ -60,10 +60,12 @@ namespace keybinds { #endif +#ifdef GEODE_IS_WINDOWS + + using namespace keybinds; void onKeybind(bool down, ActionID id) { -#ifdef GEODE_IS_WINDOWS auto& g = Global::get(); @@ -130,14 +132,11 @@ void onKeybind(bool down, ActionID id) { } } -#endif } $execute{ - #ifdef GEODE_IS_WINDOWS - BindManager * bm = BindManager::get(); bm->registerBindable({ @@ -226,5 +225,6 @@ void onKeybind(bool down, ActionID id) { }, InvokeBindFilter(nullptr, (""_spr) + keybindIDs[i])); } - #endif } + +#endif \ No newline at end of file diff --git a/src/practice_fixes/play_layer.cpp b/src/practice_fixes/play_layer.cpp index d57c2c8..a49acb6 100644 --- a/src/practice_fixes/play_layer.cpp +++ b/src/practice_fixes/play_layer.cpp @@ -57,7 +57,7 @@ class $modify(GJBaseGameLayer) { }; class $modify(CheckpointObject) { - #ifdef GEODE_IS_WINDOWS + #ifndef GEODE_IS_ANDROID bool init() { bool ret = CheckpointObject::init(); CheckpointObject* cp = this; diff --git a/src/renderer/renderer.cpp b/src/renderer/renderer.cpp index 47d2321..f2b35dd 100644 --- a/src/renderer/renderer.cpp +++ b/src/renderer/renderer.cpp @@ -199,7 +199,7 @@ void Renderer::start() { if (extraArgs.empty()) extraArgs = "-pix_fmt yuv420p"; if (videoArgs.empty()) videoArgs = "colorspace=all=bt709:iall=bt470bg:fast=1"; - std::string command = std::format( + std::string command = fmt::format( "\"{}\" -y -f rawvideo -pix_fmt rgb24 -s {}x{} -r {} -i - {}{}{} -vf \"vflip,{}\" -an \"{}\" ", ffmpegPath, std::to_string(width), @@ -272,7 +272,7 @@ void Renderer::start() { // std::string tempPathAudio = tempPath; if (audioMode == AudioMode::Record) { - command = std::format("\"{}\" -i \"{}\" -acodec pcm_s16le -ar 44100 -ac 2 \"{}\"", + command = fmt::format("\"{}\" -i \"{}\" -acodec pcm_s16le -ar 44100 -ac 2 \"{}\"", ffmpegPath, "fmodoutput.wav", tempPathAudio @@ -295,7 +295,7 @@ void Renderer::start() { if (!extraAudioArgs.empty()) extraAudioArgs += " "; - command = std::format( + command = fmt::format( "\"{}\" -y -ss {} -i \"{}\" -i \"{}\" -t {} -c:v copy {} -filter:a \"[1:a]adelay=0|0{}{}\" \"{}\"", ffmpegPath, offset, diff --git a/src/ui/button_edit_layer.cpp b/src/ui/button_edit_layer.cpp index ed69986..b2f7f3e 100644 --- a/src/ui/button_edit_layer.cpp +++ b/src/ui/button_edit_layer.cpp @@ -114,12 +114,12 @@ void ButtonEditLayer::updateSelectedLabels() { oss << std::fixed << std::setprecision(1) << scale; - scaleLbl->setString(std::format("Scale ({})", oss.str()).c_str()); + scaleLbl->setString(fmt::format("Scale ({})", oss.str()).c_str()); std::ostringstream oss2; oss2 << std::fixed << std::setprecision(1) << opacity; - opacityLbl->setString(std::format("Opacity ({})", oss2.str()).c_str()); + opacityLbl->setString(fmt::format("Opacity ({})", oss2.str()).c_str()); } void ButtonEditLayer::updateSelected(std::string selected) { diff --git a/src/ui/macro_editor.cpp b/src/ui/macro_editor.cpp index 90e8515..4789108 100644 --- a/src/ui/macro_editor.cpp +++ b/src/ui/macro_editor.cpp @@ -782,7 +782,7 @@ void MacroEditLayer::flashSelected() { CCSequence* colorSeq = CCSequence::create(tintTo, tintFrom, nullptr); CCSequence* opacitySeq = CCSequence::create(fadeTo, fadeFrom, nullptr); - CCSpawn* spawn = CCSpawn::create(colorSeq, opacitySeq, nullptr); + CCSpawn* spawn = CCSpawn::createWithTwoActions(colorSeq, opacitySeq); selectedBg->runAction(spawn); diff --git a/src/utils/utils.cpp b/src/utils/utils.cpp index 1d246c0..e20021e 100644 --- a/src/utils/utils.cpp +++ b/src/utils/utils.cpp @@ -5,7 +5,7 @@ std::string Utils::narrow(const wchar_t* str) { return ""; } -#ifdef GEODE_IS_ANDROID +#ifndef GEODE_IS_WINDOWS std::string result; size_t len = wcslen(str); @@ -44,7 +44,7 @@ std::string Utils::narrow(const wchar_t* str) { } std::wstring Utils::widen(const char* str) { -#ifdef GEODE_IS_ANDROID +#ifndef GEODE_IS_WINDOWS std::wstring result; result.reserve(strlen(str));