mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	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).
This commit is contained in:
		
							parent
							
								
									efacd65b26
								
							
						
					
					
						commit
						a59f57d504
					
				
					 7 changed files with 36 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -10,6 +10,7 @@
 | 
			
		|||
#include "core/file_sys/archive_sdmc.h"
 | 
			
		||||
#include "core/file_sys/directory_sdmc.h"
 | 
			
		||||
#include "core/file_sys/file_sdmc.h"
 | 
			
		||||
#include "core/settings.h"
 | 
			
		||||
 | 
			
		||||
////////////////////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
// FileSys namespace
 | 
			
		||||
| 
						 | 
				
			
			@ -29,8 +30,13 @@ Archive_SDMC::~Archive_SDMC() {
 | 
			
		|||
 * @return true if it initialized successfully
 | 
			
		||||
 */
 | 
			
		||||
bool Archive_SDMC::Initialize() {
 | 
			
		||||
    if (!FileUtil::IsDirectory(mount_point)) {
 | 
			
		||||
        WARN_LOG(FILESYS, "Directory %s not found, disabling SDMC.", mount_point.c_str());
 | 
			
		||||
    if (!Settings::values.use_virtual_sd) {
 | 
			
		||||
        WARN_LOG(FILESYS, "SDMC disabled by config.");
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!FileUtil::CreateFullPath(mount_point)) {
 | 
			
		||||
        WARN_LOG(FILESYS, "Unable to create SDMC path.");
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue