mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Io: Add a config setting for memstick status.
This commit is contained in:
parent
bf7a020c6a
commit
980d4194c0
@ -358,6 +358,8 @@ static ConfigSetting generalSettings[] = {
|
||||
ConfigSetting("DumpDecryptedEboots", &g_Config.bDumpDecryptedEboot, false, true, true),
|
||||
ConfigSetting("FullscreenOnDoubleclick", &g_Config.bFullscreenOnDoubleclick, true, false, false),
|
||||
|
||||
ReportedConfigSetting("MemStickInserted", &g_Config.bMemStickInserted, true, true, true),
|
||||
|
||||
ConfigSetting(false),
|
||||
};
|
||||
|
||||
|
@ -139,6 +139,7 @@ public:
|
||||
bool bAutoSaveSymbolMap;
|
||||
bool bCacheFullIsoInRam;
|
||||
int iRemoteISOPort;
|
||||
bool bMemStickInserted;
|
||||
|
||||
int iScreenRotation; // The rotation angle of the PPSSPP UI. Only supported on Android and possibly other mobile platforms.
|
||||
int iInternalScreenRotation; // The internal screen rotation angle. Useful for vertical SHMUPs and similar.
|
||||
|
@ -506,6 +506,9 @@ static void __IoVblank() {
|
||||
// We update memstick status here just to avoid possible thread safety issues.
|
||||
// It doesn't actually need to be on a vblank.
|
||||
|
||||
// This will only change status if g_Config was changed.
|
||||
MemoryStick_SetState(g_Config.bMemStickInserted ? PSP_MEMORYSTICK_STATE_INSERTED : PSP_MEMORYSTICK_STATE_NOT_INSERTED);
|
||||
|
||||
MemStickState newState = MemoryStick_State();
|
||||
MemStickFatState newFatState = MemoryStick_FatState();
|
||||
|
||||
|
@ -59,6 +59,10 @@ void MemoryStick_SetFatState(MemStickFatState state) {
|
||||
}
|
||||
|
||||
void MemoryStick_SetState(MemStickState state) {
|
||||
if (memStickState == state) {
|
||||
return;
|
||||
}
|
||||
|
||||
memStickState = state;
|
||||
|
||||
// If removed, we unmount. Otherwise, mounting is delayed.
|
||||
@ -71,8 +75,14 @@ void MemoryStick_SetState(MemStickState state) {
|
||||
}
|
||||
|
||||
void MemoryStick_Init() {
|
||||
memStickState = PSP_MEMORYSTICK_STATE_INSERTED;
|
||||
memStickFatState = PSP_FAT_MEMORYSTICK_STATE_ASSIGNED;
|
||||
if (g_Config.bMemStickInserted) {
|
||||
memStickState = PSP_MEMORYSTICK_STATE_INSERTED;
|
||||
memStickFatState = PSP_FAT_MEMORYSTICK_STATE_ASSIGNED;
|
||||
} else {
|
||||
memStickState = PSP_MEMORYSTICK_STATE_NOT_INSERTED;
|
||||
memStickFatState = PSP_FAT_MEMORYSTICK_STATE_UNASSIGNED;
|
||||
}
|
||||
|
||||
// Harry Potter and the Goblet of Fire has a bug where it can't handle certain amounts
|
||||
// of free space due to incorrect 32-bit math.
|
||||
// We use 9GB here, which does not trigger the bug, as a cap for the max free space.
|
||||
|
@ -534,6 +534,8 @@ void GameSettingsScreen::CreateViews() {
|
||||
PopupSliderChoice *rewindFreq = systemSettings->Add(new PopupSliderChoice(&g_Config.iRewindFlipFrequency, 0, 1800, sy->T("Rewind Snapshot Frequency", "Rewind Snapshot Frequency (mem hog)"), screenManager(), sy->T("frames, 0:off")));
|
||||
rewindFreq->SetZeroLabel(sy->T("Off"));
|
||||
|
||||
systemSettings->Add(new CheckBox(&g_Config.bMemStickInserted, sy->T("Memory Stick inserted")));
|
||||
|
||||
systemSettings->Add(new ItemHeader(sy->T("General")));
|
||||
|
||||
#ifdef ANDROID
|
||||
|
Loading…
Reference in New Issue
Block a user