diff options
| author | 2014-10-09 19:43:40 -0700 | |
|---|---|---|
| committer | 2014-10-22 15:24:25 -0700 | |
| commit | a59f57d50467bd5dba1f28b8020278d6298babf7 (patch) | |
| tree | 62f1528fcb2815bcb382ea8c606b6fa8fc18ba95 /src/core/file_sys | |
| parent | Merge pull request #145 from yuriks/shader-log-crash (diff) | |
| download | yuzu-a59f57d50467bd5dba1f28b8020278d6298babf7.tar.gz yuzu-a59f57d50467bd5dba1f28b8020278d6298babf7.tar.xz yuzu-a59f57d50467bd5dba1f28b8020278d6298babf7.zip | |
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).
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/archive_sdmc.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp index 213923c02..0b647f7d0 100644 --- a/src/core/file_sys/archive_sdmc.cpp +++ b/src/core/file_sys/archive_sdmc.cpp | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include "core/file_sys/archive_sdmc.h" | 10 | #include "core/file_sys/archive_sdmc.h" |
| 11 | #include "core/file_sys/directory_sdmc.h" | 11 | #include "core/file_sys/directory_sdmc.h" |
| 12 | #include "core/file_sys/file_sdmc.h" | 12 | #include "core/file_sys/file_sdmc.h" |
| 13 | #include "core/settings.h" | ||
| 13 | 14 | ||
| 14 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 15 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 15 | // FileSys namespace | 16 | // FileSys namespace |
| @@ -29,8 +30,13 @@ Archive_SDMC::~Archive_SDMC() { | |||
| 29 | * @return true if it initialized successfully | 30 | * @return true if it initialized successfully |
| 30 | */ | 31 | */ |
| 31 | bool Archive_SDMC::Initialize() { | 32 | bool Archive_SDMC::Initialize() { |
| 32 | if (!FileUtil::IsDirectory(mount_point)) { | 33 | if (!Settings::values.use_virtual_sd) { |
| 33 | WARN_LOG(FILESYS, "Directory %s not found, disabling SDMC.", mount_point.c_str()); | 34 | WARN_LOG(FILESYS, "SDMC disabled by config."); |
| 35 | return false; | ||
| 36 | } | ||
| 37 | |||
| 38 | if (!FileUtil::CreateFullPath(mount_point)) { | ||
| 39 | WARN_LOG(FILESYS, "Unable to create SDMC path."); | ||
| 34 | return false; | 40 | return false; |
| 35 | } | 41 | } |
| 36 | 42 | ||