Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Duckbill 2017-12-31 11:16:44 +03:00
commit b379d83469
6 changed files with 19 additions and 3 deletions

View File

@ -19,6 +19,7 @@ enum multiOptions
DEFAULTEMU = 0, DEFAULTEMU = 0,
BRIGHTNESS, BRIGHTNESS,
SPLASH, SPLASH,
SPLASH_DURATION,
PIN, PIN,
NEWCPU NEWCPU
}; };

View File

@ -81,6 +81,7 @@ void configMenu(bool oldPinStatus, u32 oldPinMode)
static const char *multiOptionsText[] = { "Default EmuNAND: 1( ) 2( ) 3( ) 4( )", static const char *multiOptionsText[] = { "Default EmuNAND: 1( ) 2( ) 3( ) 4( )",
"Screen brightness: 4( ) 3( ) 2( ) 1( )", "Screen brightness: 4( ) 3( ) 2( ) 1( )",
"Splash: Off( ) Before( ) After( ) payloads", "Splash: Off( ) Before( ) After( ) payloads",
"Splash duration: 1( ) 3( ) 5( ) 7( ) seconds",
"PIN lock: Off( ) 4( ) 6( ) 8( ) digits", "PIN lock: Off( ) 4( ) 6( ) 8( ) digits",
"New 3DS CPU: Off( ) Clock( ) L2( ) Clock+L2( )", "New 3DS CPU: Off( ) Clock( ) L2( ) Clock+L2( )",
}; };
@ -109,6 +110,11 @@ void configMenu(bool oldPinStatus, u32 oldPinMode)
"\t* 'After payloads' displays it\n" "\t* 'After payloads' displays it\n"
"afterwards.", "afterwards.",
"Select how long the splash screen\n"
"displays.\n\n"
"This has no effect if the splash\n"
"screen is not enabled.",
"Activate a PIN lock.\n\n" "Activate a PIN lock.\n\n"
"The PIN will be asked each time\n" "The PIN will be asked each time\n"
"Luma3DS boots.\n\n" "Luma3DS boots.\n\n"
@ -198,6 +204,7 @@ void configMenu(bool oldPinStatus, u32 oldPinMode)
{ .posXs = {19, 24, 29, 34}, .visible = isSdMode }, { .posXs = {19, 24, 29, 34}, .visible = isSdMode },
{ .posXs = {21, 26, 31, 36}, .visible = true }, { .posXs = {21, 26, 31, 36}, .visible = true },
{ .posXs = {12, 22, 31, 0}, .visible = true }, { .posXs = {12, 22, 31, 0}, .visible = true },
{ .posXs = {19, 24, 29, 34}, .visible = true },
{ .posXs = {14, 19, 24, 29}, .visible = true }, { .posXs = {14, 19, 24, 29}, .visible = true },
{ .posXs = {17, 26, 32, 44}, .visible = ISN3DS }, { .posXs = {17, 26, 32, 44}, .visible = ISN3DS },
}; };

View File

@ -34,7 +34,7 @@
#define CONFIG_FILE "config.bin" #define CONFIG_FILE "config.bin"
#define CONFIG_VERSIONMAJOR 2 #define CONFIG_VERSIONMAJOR 2
#define CONFIG_VERSIONMINOR 2 #define CONFIG_VERSIONMINOR 3
#define BOOTCFG_NAND BOOTCONFIG(0, 7) #define BOOTCFG_NAND BOOTCONFIG(0, 7)
#define BOOTCFG_FIRM BOOTCONFIG(3, 7) #define BOOTCFG_FIRM BOOTCONFIG(3, 7)
@ -46,6 +46,7 @@ enum multiOptions
DEFAULTEMU = 0, DEFAULTEMU = 0,
BRIGHTNESS, BRIGHTNESS,
SPLASH, SPLASH,
SPLASH_DURATION,
PIN, PIN,
NEWCPU NEWCPU
}; };

View File

@ -36,6 +36,7 @@
#include "fs.h" #include "fs.h"
#include "fmt.h" #include "fmt.h"
#include "font.h" #include "font.h"
#include "config.h"
bool loadSplash(void) bool loadSplash(void)
{ {
@ -56,7 +57,9 @@ bool loadSplash(void)
if(!isTopSplashValid && !isBottomSplashValid) return false; if(!isTopSplashValid && !isBottomSplashValid) return false;
swapFramebuffers(true); swapFramebuffers(true);
wait(3000ULL);
u32 durationIndex = MULTICONFIG(SPLASH_DURATION);
wait(1000ULL + (durationIndex * 2000ULL));
return true; return true;
} }

View File

@ -21,6 +21,7 @@ enum multiOptions
DEFAULTEMU = 0, DEFAULTEMU = 0,
BRIGHTNESS, BRIGHTNESS,
SPLASH, SPLASH,
SPLASH_DURATION,
PIN, PIN,
NEWCPU NEWCPU
}; };

View File

@ -58,13 +58,16 @@ Result UnregisterProcess(u32 pid)
svcCloseHandle(processData->notificationSemaphore); svcCloseHandle(processData->notificationSemaphore);
// Unregister the services registered by the process // Unregister the services registered by the process
for(u32 i = 0; i < nbServices; i++) u32 i = 0;
while(i < nbServices)
{ {
if(servicesInfo[i].pid == pid) if(servicesInfo[i].pid == pid)
{ {
svcCloseHandle(servicesInfo[i].clientPort); svcCloseHandle(servicesInfo[i].clientPort);
servicesInfo[i] = servicesInfo[--nbServices]; servicesInfo[i] = servicesInfo[--nbServices];
} }
else
++i;
} }
moveNode(processData, &freeProcessDataList, false); moveNode(processData, &freeProcessDataList, false);