mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 02:40:23 -08:00
Fixed #11278 / FPS limit changes on iOS
This commit is contained in:
parent
197d8c4060
commit
872939454f
4 changed files with 14 additions and 11 deletions
|
|
@ -1277,7 +1277,6 @@ setting.smoothcamera.name = Smooth Camera
|
|||
setting.detach-camera.name = Free Camera
|
||||
setting.detach-camera.description = If enabled, the camera moves independently of the player unit.\nThis setting can be assigned a hotkey.
|
||||
setting.vsync.name = VSync
|
||||
setting.iosuncapfps.name = High Refresh Rate
|
||||
setting.pixelate.name = Pixelate
|
||||
setting.minimap.name = Show Minimap
|
||||
setting.coreitems.name = Display Core Items
|
||||
|
|
|
|||
|
|
@ -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 -> {
|
||||
|
|
|
|||
|
|
@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||
org.gradle.internal.http.socketTimeout=100000
|
||||
org.gradle.internal.http.connectionTimeout=100000
|
||||
android.enableR8.fullMode=false
|
||||
archash=9a366d8349
|
||||
archash=8bbe39d0f6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue