Skip to content
Permalink
Browse files
Reverted changes, made second run restore the og files
  • Loading branch information
gnmmarechal committed Apr 4, 2018
1 parent d6224c1 commit e3284d114a46d4edcbba532d227a6be1e4459b67
Showing 1 changed file with 5 additions and 8 deletions.
13 main.c
@@ -97,15 +97,16 @@ int main(int argc, char *argv[]) {
printf("First run detected. Replacing Near with VitaShell...\n");
else
{
printf("Second run detected. Restoring icon layout...\n");

sceIoRemove("ux0:iconlayout.ini");
cp("ux0:iconlayout.ini", "ux0:data/iconlayout_bak.ini");
printf("Second run detected. Restoring app.db in 10 seconds (exit now if you don't want to do this)...\n");
sceKernelDelayThread(10 * 1000 * 1000);
sceIoRemove("ur0:shell/db/app.db");
cp("ur0:shell/db/app.db", "ux0:data/app_db_bak.db");

printf("\n\nRebooting in 10 seconds...");
sceKernelDelayThread(10 * 1000 * 1000);
//sceKernelExitProcess(0);
scePowerRequestColdReset();
return 0;
}

// First run
@@ -183,10 +184,6 @@ int main(int argc, char *argv[]) {
cp("ux0:data/app_db_bak.db", "ur0:shell/db/app.db");
sceIoRemove("ur0:shell/db/app.db");

// Back up icon layout file
sceIoRemove("ux0:data/iconlayout_bak.ini");
cp("ux0:data/iconlayout_bak.ini", "ux0:iconlayout.ini");

// Set flag for next run
cp("ux0:data/vsoi_flag.flg", "app0:vsoi_flag.flg");

0 comments on commit e3284d1

Please sign in to comment.