diff --git a/extras/menus/arkMenu/include/ark_settings.h b/extras/menus/arkMenu/include/ark_settings.h index 62f4fe6d..4034ae57 100644 --- a/extras/menus/arkMenu/include/ark_settings.h +++ b/extras/menus/arkMenu/include/ark_settings.h @@ -778,3 +778,55 @@ void saveSettings(){ output.close(); } +void resetSettings() { + cfw_config.usbcharge = 1; + cfw_config.overclock = 1; + cfw_config.powersave = 0; + cfw_config.defaultclock = 0; + cfw_config.launcher = 0; + cfw_config.disablepause = 0; + cfw_config.highmem = 0; + cfw_config.mscache = 1; + cfw_config.infernocache = 1; + cfw_config.oldplugin = 1; + cfw_config.skiplogos = 0; + cfw_config.hidepics = 0; + cfw_config.hibblock = 1; + cfw_config.hidemac = 1; + cfw_config.hidedlc = 0; + cfw_config.noled = 0; + cfw_config.noumd = 0; + cfw_config.noanalog = 0; + cfw_config.qaflags = 1; + cfw_config.vshregion = 0; + cfw_config.regionchange = 0; + + /*switch (cfw_config.regionchange){ + case REGION_JAPAN: + output << "vsh, region_jp, on" << endl; + break; + case REGION_AMERICA: + output << "vsh, region_us, on" << endl; + break; + case REGION_EUROPE: + output << "vsh, region_eu, on" << endl; + break; + } + + if (cfw_config.vshregion > 0){ + char tmp[10]; + snprintf(tmp, 10, "%d", cfw_config.vshregion); + output << "vsh, fakeregion_" << tmp << ", on" << endl; + } + + for (int i=0; icwd; } diff --git a/extras/menus/arkMenu/include/exit_mgr.h b/extras/menus/arkMenu/include/exit_mgr.h index f559b46d..d091d107 100644 --- a/extras/menus/arkMenu/include/exit_mgr.h +++ b/extras/menus/arkMenu/include/exit_mgr.h @@ -66,6 +66,8 @@ class ExitManager : public SystemEntry{ }; std::string getInfo(){return "Exit";}; void setInfo(std::string info){}; + void setFooter(std::string footer){}; + std::string getFooter(){return "";}; Image* getIcon(){return common::getImage(IMAGE_EXIT);}; void setName(std::string name){}; std::string getName(){return "Exit";}; diff --git a/extras/menus/arkMenu/include/gamemgr.h b/extras/menus/arkMenu/include/gamemgr.h index 7a9a7741..7af45877 100644 --- a/extras/menus/arkMenu/include/gamemgr.h +++ b/extras/menus/arkMenu/include/gamemgr.h @@ -121,6 +121,7 @@ class GameManager : public SystemEntry{ } string getInfo(); + string getFooter(); string getName(){ return "Games"; @@ -140,6 +141,7 @@ class GameManager : public SystemEntry{ bool waitIconsLoad(bool forceQuit=false); void setInfo(string info){}; + void setFooter(string info){}; void setName(string name){}; Image* getIcon(){ diff --git a/extras/menus/arkMenu/include/net_mgr.h b/extras/menus/arkMenu/include/net_mgr.h index 6b493e0d..20d347a5 100644 --- a/extras/menus/arkMenu/include/net_mgr.h +++ b/extras/menus/arkMenu/include/net_mgr.h @@ -12,6 +12,8 @@ class NetworkManager : public SystemEntry{ void resume(); std::string getInfo(); void setInfo(std::string info); + void setFooter(std::string footer); + std::string getFooter(); std::string getName(); void setName(std::string name); Image* getIcon(); diff --git a/extras/menus/arkMenu/include/settingsmenu.h b/extras/menus/arkMenu/include/settingsmenu.h index ecc8c576..e03cb0d6 100644 --- a/extras/menus/arkMenu/include/settingsmenu.h +++ b/extras/menus/arkMenu/include/settingsmenu.h @@ -39,6 +39,7 @@ class SettingsMenu : public SystemEntry{ int max_height; string info; + string footer; string name; int icon; @@ -75,6 +76,10 @@ class SettingsMenu : public SystemEntry{ void setInfo(string info){ this->info = info; } + + void setFooter(string footer) { + this->footer = footer; + } void setName(string name){ this->name = name; @@ -83,6 +88,10 @@ class SettingsMenu : public SystemEntry{ string getInfo(){ return this->info; } + + string getFooter() { + return this->footer; + } Image* getIcon(){ return common::getImage(icon); diff --git a/extras/menus/arkMenu/include/system_entry.h b/extras/menus/arkMenu/include/system_entry.h index 854e44fd..103cc120 100644 --- a/extras/menus/arkMenu/include/system_entry.h +++ b/extras/menus/arkMenu/include/system_entry.h @@ -15,14 +15,17 @@ class SystemEntry{ virtual void pause()=0; virtual void resume()=0; virtual std::string getInfo()=0; + virtual std::string getFooter()=0; virtual void setInfo(std::string info)=0; virtual Image* getIcon()=0; virtual void setName(std::string name)=0; + virtual void setFooter(std::string footer)=0; virtual std::string getName()=0; virtual bool isStillLoading()=0; virtual void drawInfo(){ scroll.w = 200; common::printText(5, 13, this->getInfo().c_str(), LITEGRAY, SIZE_MEDIUM, 0, &scroll); + common::printText(180, 268, this->getFooter().c_str(), LITEGRAY, SIZE_MEDIUM, 0, &scroll); } }; diff --git a/extras/menus/arkMenu/main.cpp b/extras/menus/arkMenu/main.cpp index a04c50bb..81bb4a39 100644 --- a/extras/menus/arkMenu/main.cpp +++ b/extras/menus/arkMenu/main.cpp @@ -88,6 +88,7 @@ int main(int argc, char** argv){ settings_menu->setCallbacks(NULL, loadSettings, cleanupSettings); settings_menu->setName("CFW Settings"); settings_menu->setInfo("ARK Custom Firmware Settings"); + settings_menu->setFooter("[] to Reset Settings"); settings_menu->readConf(); entries[n_entries++] = settings_menu; diff --git a/extras/menus/arkMenu/src/gamemgr.cpp b/extras/menus/arkMenu/src/gamemgr.cpp index eca7bfe3..badcbbda 100644 --- a/extras/menus/arkMenu/src/gamemgr.cpp +++ b/extras/menus/arkMenu/src/gamemgr.cpp @@ -377,6 +377,10 @@ void GameManager::stopFastScroll(){ this->categories[this->selectedCategory]->stopFastScroll(); } +string GameManager::getFooter(){ + return ""; +} + string GameManager::getInfo(){ if (selectedCategory >= 0){ Entry* e = getEntry(); diff --git a/extras/menus/arkMenu/src/net_mgr.cpp b/extras/menus/arkMenu/src/net_mgr.cpp index 526babdf..15b8081f 100644 --- a/extras/menus/arkMenu/src/net_mgr.cpp +++ b/extras/menus/arkMenu/src/net_mgr.cpp @@ -335,6 +335,9 @@ void NetworkManager::resume(){ while (animation != 0) sceKernelDelayThread(0); } +std::string NetworkManager::getFooter(){ + return ""; +} std::string NetworkManager::getInfo(){ return "Network Tools"; @@ -344,6 +347,10 @@ std::string NetworkManager::getName(){ return "Network"; } +void NetworkManager::setFooter(std::string footer){ + +} + void NetworkManager::setInfo(std::string info){ } diff --git a/extras/menus/arkMenu/src/settingsmenu.cpp b/extras/menus/arkMenu/src/settingsmenu.cpp index 876438e0..64f26d1c 100644 --- a/extras/menus/arkMenu/src/settingsmenu.cpp +++ b/extras/menus/arkMenu/src/settingsmenu.cpp @@ -9,6 +9,7 @@ #define PAGE_SIZE 10 extern string ark_version; +extern void resetSettings(); SettingsMenu::SettingsMenu(SettingsTable* table, void (*save_callback)(), bool shorten_paths, bool show_all_opts, bool show_info){ this->animation = -1; @@ -263,6 +264,11 @@ void SettingsMenu::control(Controller* pad){ changed = true; } } + else if (pad->square()) { + pause(); + resetSettings(); + resume(); + } } void SettingsMenu::applyConf(){ @@ -308,4 +314,4 @@ void SettingsMenu::resume(){ int SettingsMenu::getIndex(){ return index; -} \ No newline at end of file +}