1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-25 21:05:56 +02:00

Automatically switches CARD_ROOT to / when CARD_ROOT doesn't exist

This commit is contained in:
bartbes 2010-09-01 22:50:43 +02:00
parent cf9628a4cc
commit 5c05348ba9

View File

@ -806,6 +806,10 @@ void GMenu2X::main() {
btnContextMenu.setPosition(resX-38, bottomBarIconY);
btnContextMenu.setAction(MakeDelegate(this, &GMenu2X::contextMenu));
if (!fileExists(CARD_ROOT))
CARD_ROOT = "/";
while (!quit) {
tickNow = SDL_GetTicks();
@ -1068,10 +1072,10 @@ void GMenu2X::options() {
if (curGlobalVolume!=confInt["globalVolume"]) setVolume(confInt["globalVolume"]);
if (lang == "English") lang = "";
if (lang != tr.lang()) tr.setLang(lang);
if (fileExists(CARD_ROOT) && !showRootFolder)
/*if (fileExists(CARD_ROOT) && !showRootFolder)
unlink(CARD_ROOT);
else if (!fileExists(CARD_ROOT) /*&& showRootFolder*/)
symlink("/", CARD_ROOT);
else if (!fileExists(CARD_ROOT) && showRootFolder)
symlink("/", CARD_ROOT);*/
//WARNING: the above might be dangerous with CARD_ROOT set to /
writeConfig();
}