Skip to content

Commit aa2de52

Browse files
committed
I hate ios
1 parent 526f7fa commit aa2de52

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"win": "",
3232
"mac": "",
3333
"android": "",
34-
"ios": "{gd_dir}/Clubstep.mp3"
34+
"ios": "{mod_config_dir}/default.splash"
3535
},
3636
"control": {
3737
"dialog": "open",

src/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include <Geode/Geode.hpp>
2+
3+
using namespace geode::prelude;
4+
5+
// Empty default paths in mod.json breaks on iOS.
6+
// Workaround is to create a config folder and use
7+
// that as the default file on iOS.
8+
#ifdef GEODE_IS_IOS
9+
$on_mod(Loaded) {
10+
auto defaultSplash = Mod::get()->getConfigDir() / R"(default.splash)";
11+
if (std::filesystem::exists(defaultSplash)) return;
12+
const std::string& content = "# this is where she makes a mod";
13+
if (const auto result = utils::file::writeString(defaultSplash, content); result.isErr()) log::error("Error writing to default.splash");
14+
}
15+
#endif // #ifdef GEODE_IS_IOS

0 commit comments

Comments
 (0)