Fixed #11278 / FPS limit changes on iOS
This commit is contained in:
@@ -214,7 +214,7 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
|
||||
public void update(){
|
||||
PerfCounter.update.begin();
|
||||
|
||||
int targetfps = Core.settings.getInt("fpscap", 120);
|
||||
int targetfps = ios ? 0 : Core.settings.getInt("fpscap", 120);
|
||||
boolean changed = lastTargetFps != targetfps && lastTargetFps != -1;
|
||||
boolean limitFps = targetfps > 0 && targetfps <= 240;
|
||||
|
||||
|
||||
@@ -386,7 +386,18 @@ public class SettingsMenuDialog extends BaseDialog{
|
||||
graphics.sliderPref("bloomintensity", 6, 0, 16, i -> (int)(i/4f * 100f) + "%");
|
||||
graphics.sliderPref("bloomblur", 2, 1, 16, i -> i + "x");
|
||||
|
||||
graphics.sliderPref("fpscap", 240, 10, 245, 5, s -> (s > 240 ? Core.bundle.get("setting.fpscap.none") : Core.bundle.format("setting.fpscap.text", s)));
|
||||
graphics.sliderPref("fpscap", 240, 10, 245, 5, s -> {
|
||||
if(ios){
|
||||
Core.graphics.setPreferredFPS(s > 240 ? 0 : s);
|
||||
}
|
||||
return (s > 240 ? Core.bundle.get("setting.fpscap.none") : Core.bundle.format("setting.fpscap.text", s));
|
||||
});
|
||||
|
||||
if(ios){
|
||||
int value = Core.settings.getInt("fpscap", 240);
|
||||
Core.graphics.setPreferredFPS(value > 240 ? 0 : value);
|
||||
}
|
||||
|
||||
graphics.sliderPref("chatopacity", 100, 0, 100, 5, s -> s + "%");
|
||||
graphics.sliderPref("lasersopacity", 100, 0, 100, 5, s -> {
|
||||
if(ui.settings != null){
|
||||
@@ -412,13 +423,6 @@ public class SettingsMenuDialog extends BaseDialog{
|
||||
return s + "%";
|
||||
});
|
||||
|
||||
if(ios){
|
||||
graphics.checkPref("iosuncapfps", false, b -> Core.graphics.setPreferredFPS(b ? 0 : 60));
|
||||
if(Core.settings.getBool("iosuncapfps")){
|
||||
Core.graphics.setPreferredFPS(0);
|
||||
}
|
||||
}
|
||||
|
||||
if(!mobile){
|
||||
graphics.checkPref("vsync", true, b -> Core.graphics.setVSync(b));
|
||||
graphics.checkPref("fullscreen", false, b -> {
|
||||
|
||||
Reference in New Issue
Block a user