From a59f57d50467bd5dba1f28b8020278d6298babf7 Mon Sep 17 00:00:00 2001 From: archshift Date: Thu, 9 Oct 2014 19:43:40 -0700 Subject: Use config files to store whether SDMC is enabled or not Before, it used to use whether the directory actually existed. As a result, .citra-emu/sdmc was never auto-created (something quite confusing to me until I read through the logs). --- src/citra/config.cpp | 5 +++++ src/citra/config.h | 1 + src/citra/default_ini.h | 3 +++ 3 files changed, 9 insertions(+) (limited to 'src/citra') diff --git a/src/citra/config.cpp b/src/citra/config.cpp index 1d5e9c71..03a0ce60 100644 --- a/src/citra/config.cpp +++ b/src/citra/config.cpp @@ -55,9 +55,14 @@ void Config::ReadControls() { Settings::values.pad_sright_key = glfw_config->GetInteger("Controls", "pad_sright", GLFW_KEY_RIGHT); } +void Config::ReadData() { + Settings::values.use_virtual_sd = glfw_config->GetBoolean("Data Storage", "use_virtual_sd", true); +} + void Config::Reload() { LoadINI(glfw_config, glfw_config_loc.c_str(), DefaultINI::glfw_config_file); ReadControls(); + ReadData(); } Config::~Config() { diff --git a/src/citra/config.h b/src/citra/config.h index de0570b4..c4fac245 100644 --- a/src/citra/config.h +++ b/src/citra/config.h @@ -16,6 +16,7 @@ class Config { bool LoadINI(INIReader* config, const char* location, const std::string& default_contents="", bool retry=true); void ReadControls(); + void ReadData(); public: Config(); ~Config(); diff --git a/src/citra/default_ini.h b/src/citra/default_ini.h index 11b985e1..e7e45f4a 100644 --- a/src/citra/default_ini.h +++ b/src/citra/default_ini.h @@ -25,6 +25,9 @@ pad_sup = pad_sdown = pad_sleft = pad_sright = + +[Data Storage] +use_virtual_sd = )"; } -- cgit v1.2.3