mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-02 14:58:03 +03:00
Core: If configured, sync SD card image with SD card folder on emulation start and end.
Co-authored-by: Pablo Stebler <pablo@stebler.xyz>
This commit is contained in:
parent
b66cc1caf6
commit
77d4591fb4
5 changed files with 445 additions and 7 deletions
|
@ -25,6 +25,7 @@
|
|||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Event.h"
|
||||
#include "Common/FPURoundMode.h"
|
||||
#include "Common/FatFsUtil.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/Flag.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
|
@ -495,6 +496,16 @@ static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi
|
|||
const bool delete_savestate =
|
||||
boot_session_data.GetDeleteSavestate() == DeleteSavestateAfterBoot::Yes;
|
||||
|
||||
bool sync_sd_folder = core_parameter.bWii && Config::Get(Config::MAIN_WII_SD_CARD) &&
|
||||
Config::Get(Config::MAIN_WII_SD_CARD_ENABLE_FOLDER_SYNC);
|
||||
if (sync_sd_folder)
|
||||
sync_sd_folder = Common::SyncSDFolderToSDImage();
|
||||
|
||||
Common::ScopeGuard sd_folder_sync_guard{[sync_sd_folder] {
|
||||
if (sync_sd_folder && Config::Get(Config::MAIN_ALLOW_SD_WRITES))
|
||||
Common::SyncSDImageToSDFolder();
|
||||
}};
|
||||
|
||||
// Load and Init Wiimotes - only if we are booting in Wii mode
|
||||
bool init_wiimotes = false;
|
||||
if (core_parameter.bWii && !Config::Get(Config::MAIN_BLUETOOTH_PASSTHROUGH_ENABLED))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue