mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Android: Expose emulated memory size override
Update BooleanSetting.java
This commit is contained in:
parent
96c8a7ee1f
commit
6448d6dbe7
@ -42,6 +42,8 @@ public enum BooleanSetting implements AbstractBooleanSetting
|
||||
false),
|
||||
MAIN_SYNC_GPU(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SyncGPU", false),
|
||||
MAIN_OVERCLOCK_ENABLE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "OverclockEnable", false),
|
||||
MAIN_RAM_OVERRIDE_ENABLE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "RAMOverrideEnable",
|
||||
false),
|
||||
MAIN_AUTO_DISC_CHANGE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "AutoDiscChange", false),
|
||||
MAIN_ALLOW_SD_WRITES(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "WiiSDCardAllowWrites",
|
||||
true),
|
||||
@ -264,6 +266,7 @@ public enum BooleanSetting implements AbstractBooleanSetting
|
||||
MAIN_MMU,
|
||||
MAIN_PAUSE_ON_PANIC,
|
||||
MAIN_ACCURATE_CPU_CACHE,
|
||||
MAIN_RAM_OVERRIDE_ENABLE,
|
||||
MAIN_DSP_JIT,
|
||||
};
|
||||
|
||||
|
@ -18,6 +18,8 @@ public enum IntSetting implements AbstractIntSetting
|
||||
MAIN_CPU_CORE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "CPUCore",
|
||||
NativeLibrary.DefaultCPUCore()),
|
||||
MAIN_GC_LANGUAGE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SelectedLanguage", 0),
|
||||
MAIN_MEM1_SIZE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "MEM1Size", 0x01800000),
|
||||
MAIN_MEM2_SIZE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "MEM2Size", 0x04000000),
|
||||
MAIN_SLOT_A(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SlotA", 8),
|
||||
MAIN_SLOT_B(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SlotB", 255),
|
||||
MAIN_SERIAL_PORT_1(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SerialPort1", 255),
|
||||
@ -83,6 +85,8 @@ public enum IntSetting implements AbstractIntSetting
|
||||
private static final IntSetting[] NOT_RUNTIME_EDITABLE_ARRAY = new IntSetting[]{
|
||||
MAIN_CPU_CORE,
|
||||
MAIN_GC_LANGUAGE,
|
||||
MAIN_MEM1_SIZE,
|
||||
MAIN_MEM2_SIZE,
|
||||
MAIN_SLOT_A, // Can actually be changed, but specific code is required
|
||||
MAIN_SLOT_B, // Can actually be changed, but specific code is required
|
||||
MAIN_SERIAL_PORT_1,
|
||||
|
@ -729,6 +729,78 @@ public final class SettingsFragmentPresenter
|
||||
R.string.overclock_enable, R.string.overclock_enable_description));
|
||||
sl.add(new PercentSliderSetting(mContext, FloatSetting.MAIN_OVERCLOCK, R.string.overclock_title,
|
||||
R.string.overclock_title_description, 0, 400, "%"));
|
||||
|
||||
AbstractIntSetting mem1Setting = new AbstractIntSetting()
|
||||
{
|
||||
@Override
|
||||
public int getInt(Settings settings)
|
||||
{
|
||||
return IntSetting.MAIN_MEM1_SIZE.getInt(settings) / 1024 / 1024;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInt(Settings settings, int newValue)
|
||||
{
|
||||
IntSetting.MAIN_MEM1_SIZE.setInt(settings, newValue * 1024 * 1024);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOverridden(Settings settings)
|
||||
{
|
||||
return IntSetting.MAIN_MEM1_SIZE.isOverridden(settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRuntimeEditable()
|
||||
{
|
||||
return IntSetting.MAIN_MEM1_SIZE.isRuntimeEditable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delete(Settings settings)
|
||||
{
|
||||
return IntSetting.MAIN_MEM1_SIZE.delete(settings);
|
||||
}
|
||||
};
|
||||
AbstractIntSetting mem2Setting = new AbstractIntSetting()
|
||||
{
|
||||
@Override
|
||||
public int getInt(Settings settings)
|
||||
{
|
||||
return IntSetting.MAIN_MEM2_SIZE.getInt(settings) / 1024 / 1024;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInt(Settings settings, int newValue)
|
||||
{
|
||||
IntSetting.MAIN_MEM2_SIZE.setInt(settings, newValue * 1024 * 1024);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOverridden(Settings settings)
|
||||
{
|
||||
return IntSetting.MAIN_MEM2_SIZE.isOverridden(settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRuntimeEditable()
|
||||
{
|
||||
return IntSetting.MAIN_MEM2_SIZE.isRuntimeEditable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delete(Settings settings)
|
||||
{
|
||||
return IntSetting.MAIN_MEM2_SIZE.delete(settings);
|
||||
}
|
||||
};
|
||||
sl.add(new HeaderSetting(mContext, R.string.memory_override, 0));
|
||||
sl.add(new SwitchSetting(mContext, BooleanSetting.MAIN_RAM_OVERRIDE_ENABLE,
|
||||
R.string.enable_memory_size_override,
|
||||
R.string.enable_memory_size_override_description));
|
||||
sl.add(new IntSliderSetting(mContext, mem1Setting, R.string.main_mem1_size, 0, 24, 64, "MB"));
|
||||
sl.add(new IntSliderSetting(mContext, mem2Setting, R.string.main_mem2_size, 0, 64, 128, "MB"));
|
||||
|
||||
sl.add(new SingleChoiceSetting(mContext, synchronizeGpuThread, R.string.synchronize_gpu_thread,
|
||||
R.string.synchronize_gpu_thread_description, R.array.synchronizeGpuThreadEntries,
|
||||
R.array.synchronizeGpuThreadValues));
|
||||
|
@ -392,6 +392,11 @@
|
||||
<string name="overclock_enable_description">Higher values can make variable-framerate games run at a higher framerate, requiring a powerful device. Lower values make games run at a lower framerate, increasing emulation speed, but reducing the emulated console\'s performance.</string>
|
||||
<string name="overclock_title">Emulated CPU Clock Speed</string>
|
||||
<string name="overclock_title_description">Adjusts the emulated CPU\'s clock rate if \"Override Emulated CPU Clock Speed\" is enabled.</string>
|
||||
<string name="memory_override">Memory Override</string>
|
||||
<string name="enable_memory_size_override">Enable Emulated Memory Size Override</string>
|
||||
<string name="enable_memory_size_override_description">Adjusts the amount of RAM in the emulated console.\n\nWARNING: Enabling this will completely break many games. Only a small number of games can benefit from this.</string>
|
||||
<string name="main_mem1_size">MEM1 Size</string>
|
||||
<string name="main_mem2_size">MEM2 Size</string>
|
||||
<string name="synchronize_gpu_thread">Synchronize GPU Thread</string>
|
||||
<string name="synchronize_gpu_thread_description">Synchronizing the GPU thread reduces the risk of games crashing or becoming unstable with dual core enabled, but can also reduce the performance gain of dual core. If unsure, select \"On Idle Skipping\". Selecting \"Never\" is risky and not recommended!</string>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user