[Project64] Add Setting for Setting_PreAllocSyncMem

This commit is contained in:
zilmar 2016-11-21 18:09:07 +11:00
parent 756e3a06df
commit d2232f9150
4 changed files with 20 additions and 13 deletions

View File

@ -11,7 +11,7 @@
package emu.project64.jni;
public enum SettingsID
{
{
//Default values
Default_None,
Default_Constant,
@ -51,6 +51,7 @@ public enum SettingsID
Setting_LanguageDirDefault,
Setting_CurrentLanguage,
Setting_EnableDisk,
Setting_PreAllocSyncMem,
//RDB Settings
Rdb_GoodName,
@ -290,16 +291,15 @@ public enum SettingsID
Cheat_Range,
Cheat_RangeNotes,
/*, FirstUISettings, LastUISettings = FirstUISettings + MaxPluginSetting,
FirstRSPDefaultSet, LastRSPDefaultSet = FirstRSPDefaultSet + MaxPluginSetting,
FirstRSPSettings, LastRSPSettings = FirstRSPSettings + MaxPluginSetting,
FirstGfxDefaultSet, LastGfxDefaultSet = FirstGfxDefaultSet + MaxPluginSetting,
FirstGfxSettings, LastGfxSettings = FirstGfxSettings + MaxPluginSetting,
FirstAudioDefaultSet, LastAudioDefaultSet = FirstAudioDefaultSet + MaxPluginSetting,
FirstAudioSettings, LastAudioSettings = FirstAudioSettings + MaxPluginSetting,
FirstCtrlDefaultSet, LastCtrlDefaultSet = FirstCtrlDefaultSet + MaxPluginSetting,
FirstCtrlSettings, LastCtrlSettings = FirstCtrlSettings + MaxPluginSetting,
;*/
FirstUISettings, LastUISettings(FirstUISettings.getValue() + 65535),
FirstRSPDefaultSet, LastRSPDefaultSet(FirstRSPDefaultSet.getValue() + 65535),
FirstRSPSettings, LastRSPSettings(FirstRSPSettings.getValue() + 65535),
FirstGfxDefaultSet, LastGfxDefaultSet(FirstGfxDefaultSet.getValue() + 65535),
FirstGfxSettings, LastGfxSettings(FirstGfxSettings.getValue() + 65535),
FirstAudioDefaultSet, LastAudioDefaultSet(FirstAudioDefaultSet.getValue() + 65535),
FirstAudioSettings, LastAudioSettings(FirstAudioSettings.getValue() + 65535),
FirstCtrlDefaultSet, LastCtrlDefaultSet(FirstCtrlDefaultSet.getValue() + 65535),
FirstCtrlSettings, LastCtrlSettings(FirstCtrlSettings.getValue() + 65535),
;
private int value;
@ -316,5 +316,10 @@ public enum SettingsID
{
this.value = StaticFields.Counter;
StaticFields.Counter += 1;
}
}
private SettingsID(int value)
{
this.value = value;
StaticFields.Counter = this.value + 1;
}
}

View File

@ -108,7 +108,7 @@ void CMipsMemoryVM::Reset(bool /*EraseMemory*/)
void CMipsMemoryVM::ReserveMemory()
{
m_Reserve1 = (uint8_t *)AllocateAddressSpace(0x20000000);
if (g_Settings->LoadBool(Debugger_Enabled))
if (g_Settings->LoadBool(Debugger_Enabled) && g_Settings->LoadBool(Setting_PreAllocSyncMem))
{
m_Reserve2 = (uint8_t *)AllocateAddressSpace(0x20000000);
}

View File

@ -56,6 +56,7 @@ enum SettingID
Setting_LanguageDirDefault,
Setting_CurrentLanguage,
Setting_EnableDisk,
Setting_PreAllocSyncMem,
//RDB Settings
Rdb_GoodName,

View File

@ -121,6 +121,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
#endif
AddHandler(Setting_CurrentLanguage, new CSettingTypeApplication("", "Current Language", ""));
AddHandler(Setting_EnableDisk, new CSettingTypeTempBool(false));
AddHandler(Setting_PreAllocSyncMem, new CSettingTypeApplication("", "PreAllocSyncMem", true));
AddHandler(Setting_LanguageDirDefault, new CSettingTypeRelativePath("Lang", ""));
AddHandler(Setting_LanguageDir, new CSettingTypeApplicationPath("Lang Directory", "Directory", Setting_LanguageDirDefault));