mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-03 08:08:39 -04:00
Fix emummc nintendo dir redirection
This commit is contained in:
parent
c8f2d17d02
commit
0dcb496522
8 changed files with 66 additions and 26 deletions
|
@ -65,6 +65,9 @@ static FsFile g_cal0_file = {0};
|
|||
static u8 g_cal0_storage_backup[ProdinfoSize];
|
||||
static u8 g_cal0_backup[ProdinfoSize];
|
||||
|
||||
/* Emummc-related file. */
|
||||
static FsFile g_emummc_file = {0};
|
||||
|
||||
static bool IsHexadecimal(const char *str) {
|
||||
while (*str) {
|
||||
if (isxdigit(*str)) {
|
||||
|
@ -196,6 +199,14 @@ void Utils::InitializeThreadFunc(void *args) {
|
|||
}
|
||||
|
||||
Utils::RefreshConfiguration();
|
||||
|
||||
/* If we're emummc, persist a write handle to prevent other processes from touching the image. */
|
||||
if (IsEmummc()) {
|
||||
const char *emummc_file_path = GetEmummcFilePath();
|
||||
if (emummc_file_path != nullptr) {
|
||||
fsFsOpenFile(&g_sd_filesystem, emummc_file_path, FS_OPEN_READ | FS_OPEN_WRITE, &g_emummc_file);
|
||||
}
|
||||
}
|
||||
|
||||
/* Initialize set:sys. */
|
||||
DoWithSmSession([&]() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue