[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; package emu.project64.jni;
public enum SettingsID public enum SettingsID
{ {
//Default values //Default values
Default_None, Default_None,
Default_Constant, Default_Constant,
@ -51,6 +51,7 @@ public enum SettingsID
Setting_LanguageDirDefault, Setting_LanguageDirDefault,
Setting_CurrentLanguage, Setting_CurrentLanguage,
Setting_EnableDisk, Setting_EnableDisk,
Setting_PreAllocSyncMem,
//RDB Settings //RDB Settings
Rdb_GoodName, Rdb_GoodName,
@ -290,16 +291,15 @@ public enum SettingsID
Cheat_Range, Cheat_Range,
Cheat_RangeNotes, Cheat_RangeNotes,
/*, FirstUISettings, LastUISettings = FirstUISettings + MaxPluginSetting, FirstUISettings, LastUISettings(FirstUISettings.getValue() + 65535),
FirstRSPDefaultSet, LastRSPDefaultSet = FirstRSPDefaultSet + MaxPluginSetting, FirstRSPDefaultSet, LastRSPDefaultSet(FirstRSPDefaultSet.getValue() + 65535),
FirstRSPSettings, LastRSPSettings = FirstRSPSettings + MaxPluginSetting, FirstRSPSettings, LastRSPSettings(FirstRSPSettings.getValue() + 65535),
FirstGfxDefaultSet, LastGfxDefaultSet = FirstGfxDefaultSet + MaxPluginSetting, FirstGfxDefaultSet, LastGfxDefaultSet(FirstGfxDefaultSet.getValue() + 65535),
FirstGfxSettings, LastGfxSettings = FirstGfxSettings + MaxPluginSetting, FirstGfxSettings, LastGfxSettings(FirstGfxSettings.getValue() + 65535),
FirstAudioDefaultSet, LastAudioDefaultSet = FirstAudioDefaultSet + MaxPluginSetting, FirstAudioDefaultSet, LastAudioDefaultSet(FirstAudioDefaultSet.getValue() + 65535),
FirstAudioSettings, LastAudioSettings = FirstAudioSettings + MaxPluginSetting, FirstAudioSettings, LastAudioSettings(FirstAudioSettings.getValue() + 65535),
FirstCtrlDefaultSet, LastCtrlDefaultSet = FirstCtrlDefaultSet + MaxPluginSetting, FirstCtrlDefaultSet, LastCtrlDefaultSet(FirstCtrlDefaultSet.getValue() + 65535),
FirstCtrlSettings, LastCtrlSettings = FirstCtrlSettings + MaxPluginSetting, FirstCtrlSettings, LastCtrlSettings(FirstCtrlSettings.getValue() + 65535),
;*/
; ;
private int value; private int value;
@ -316,5 +316,10 @@ public enum SettingsID
{ {
this.value = StaticFields.Counter; this.value = StaticFields.Counter;
StaticFields.Counter += 1; 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() void CMipsMemoryVM::ReserveMemory()
{ {
m_Reserve1 = (uint8_t *)AllocateAddressSpace(0x20000000); 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); m_Reserve2 = (uint8_t *)AllocateAddressSpace(0x20000000);
} }

View File

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

View File

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