2023-06-05 20:42:22 -04:00
|
|
|
#include <Geode/DefaultInclude.hpp>
|
|
|
|
|
|
|
|
#ifdef GEODE_IS_ANDROID
|
|
|
|
|
|
|
|
using namespace geode::prelude;
|
|
|
|
|
|
|
|
#include <Geode/utils/cocos.hpp>
|
|
|
|
#include <Geode/loader/Dirs.hpp>
|
|
|
|
#include <Geode/utils/web.hpp>
|
|
|
|
#include <ghc/filesystem.hpp>
|
|
|
|
|
|
|
|
ghc::filesystem::path dirs::getGameDir() {
|
2023-09-16 10:11:36 -04:00
|
|
|
return ghc::filesystem::path(
|
|
|
|
"/storage/emulated/0/Android/data/com.geode.launcher/files/game"
|
|
|
|
// "/data/user/0/com.geode.launcher/files/"
|
|
|
|
/*CCFileUtils::sharedFileUtils()->getWritablePath().c_str()*/
|
|
|
|
);
|
2023-06-05 20:42:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
ghc::filesystem::path dirs::getSaveDir() {
|
2023-09-16 10:11:36 -04:00
|
|
|
return ghc::filesystem::path(
|
|
|
|
"/storage/emulated/0/Android/data/com.geode.launcher/files/save"
|
|
|
|
// "/data/user/0/com.geode.launcher/files/"
|
|
|
|
/*CCFileUtils::sharedFileUtils()->getWritablePath().c_str()*/
|
|
|
|
);
|
2023-06-05 20:42:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void utils::web::openLinkInBrowser(std::string const& url) {
|
|
|
|
CCApplication::sharedApplication()->openURL(url.c_str());
|
|
|
|
}
|
|
|
|
|
|
|
|
bool utils::file::openFolder(ghc::filesystem::path const&) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
geode::Result<ghc::filesystem::path> utils::file::
|
|
|
|
pickFile(geode::utils::file::PickMode, geode::utils::file::FilePickOptions const&) {
|
|
|
|
return geode::Err("This function is currently unimplemented");
|
|
|
|
}
|
|
|
|
|
2023-09-14 08:56:51 -04:00
|
|
|
void geode::utils::game::launchLoaderUninstaller(bool deleteSaveData) {
|
|
|
|
log::error("Launching Geode uninstaller is not supported on android");
|
|
|
|
}
|
|
|
|
|
|
|
|
void geode::utils::game::exit() {
|
|
|
|
// Not implemented
|
|
|
|
log::error("Exiting the game is not implemented on android");
|
|
|
|
}
|
|
|
|
|
|
|
|
void geode::utils::game::restart() {
|
|
|
|
// Not implemented
|
|
|
|
log::error("Restarting the game is not implemented on android");
|
|
|
|
}
|
|
|
|
|
2023-06-05 20:42:22 -04:00
|
|
|
#endif
|