Skip to content

Commit

Permalink
Sync nds-bootstrap SD settings to flashcard
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Dec 26, 2018
1 parent 705512d commit e6e4d2b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mainmenu/arm9/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1961,6 +1961,9 @@ int main(int argc, char **argv) {

std::string path = argarray[0];
std::string savepath = savename;
if (sdFound() && secondaryDevice) {
fcopy("sd:/_nds/nds-bootstrap.ini", "fat:/_nds/nds-bootstrap.ini"); // Sync nds-bootstrap SD settings to flashcard
}
bootstrapinipath = (secondaryDevice ? "fat:/_nds/nds-bootstrap.ini" : "sd:/_nds/nds-bootstrap.ini");
CIniFile bootstrapini( bootstrapinipath );
bootstrapini.SetString("NDS-BOOTSTRAP", "NDS_PATH", path);
Expand Down
6 changes: 6 additions & 0 deletions romsel_aktheme/arm9/source/common/bootstrapconfig.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "bootstrapconfig.h"
#include "dsimenusettings.h"
#include "filecopy.h"
#include "flashcard.h"
#include "loaderconfig.h"
#include "tool/stringtool.h"
#include <stdio.h>
Expand Down Expand Up @@ -344,6 +346,10 @@ int BootstrapConfig::launch()

std::string savename = replaceAll(_fileName, ".nds", ".sav");

if (sdFound() && ms().secondaryDevice) {
fcopy(BOOTSTRAP_INI, BOOTSTRAP_INI_FC); // Sync nds-bootstrap SD settings to flashcard
}

std::string bootstrapPath;
if (ms().secondaryDevice) {
if (_useNightlyBootstrap && _isHomebrew)
Expand Down
3 changes: 3 additions & 0 deletions romsel_dsimenutheme/arm9/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,9 @@ int main(int argc, char **argv) {

std::string path = argarray[0];
std::string savepath = savename;
if (sdFound() && secondaryDevice) {
fcopy("sd:/_nds/nds-bootstrap.ini", "fat:/_nds/nds-bootstrap.ini"); // Sync nds-bootstrap SD settings to flashcard
}
bootstrapinipath = (secondaryDevice ? "fat:/_nds/nds-bootstrap.ini" : "sd:/_nds/nds-bootstrap.ini");
CIniFile bootstrapini( bootstrapinipath );
bootstrapini.SetString("NDS-BOOTSTRAP", "NDS_PATH", path);
Expand Down
3 changes: 3 additions & 0 deletions romsel_r4theme/arm9/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1507,6 +1507,9 @@ int main(int argc, char **argv) {

std::string path = argarray[0];
std::string savepath = savename;
if (sdFound() && secondaryDevice) {
fcopy("sd:/_nds/nds-bootstrap.ini", "fat:/_nds/nds-bootstrap.ini"); // Sync nds-bootstrap SD settings to flashcard
}
bootstrapinipath = (secondaryDevice ? "fat:/_nds/nds-bootstrap.ini" : "sd:/_nds/nds-bootstrap.ini");
CIniFile bootstrapini( bootstrapinipath );
bootstrapini.SetString("NDS-BOOTSTRAP", "NDS_PATH", path);
Expand Down

0 comments on commit e6e4d2b

Please sign in to comment.