mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2026-08-28 05:45:03 -06:00
Memory settings changes
- Allow allocate up to 1100mb for 32bit (note: not all devices can get to this, so don’t report crash if set too much!) - Allow allocate more than 4GB for 64bit if free memory is over 4GB.
This commit is contained in:
parent
3cda62b2df
commit
39a2cd57b2
1 changed files with 4 additions and 2 deletions
|
|
@ -48,10 +48,12 @@ public class LauncherPreferenceFragment extends PreferenceFragmentCompat impleme
|
|||
seek6.setMax(300);
|
||||
seek6.setSuffix(" %");
|
||||
|
||||
long freeMem = Runtime.getRuntime().freeMemory() / 1048576;
|
||||
|
||||
CustomSeekBarPreference seek7 = (CustomSeekBarPreference) findPreference("allocation");
|
||||
seek7.setMin(256);
|
||||
if(Tools.CURRENT_ARCHITECTURE.contains("32")) seek7.setMax(800);
|
||||
else seek7.setMax(4096);
|
||||
if(Tools.CURRENT_ARCHITECTURE.contains("32")) seek7.setMax(1100);
|
||||
else seek7.setMax(freeMem > 4096 ? freeMem : 4096);
|
||||
seek7.setValue(LauncherPreferences.PREF_RAM_ALLOCATION);
|
||||
seek7.setSuffix(" MB");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue