mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 06:51:32 +01:00
(feature) limit unfocused fps
This commit is contained in:
parent
006737e127
commit
1d11f5a65b
@ -332,8 +332,8 @@ public abstract class MinecraftMixin implements MinecraftExt {
|
||||
{
|
||||
if (this.theWorld == null && this.currentScreen != null) return this.currentScreen instanceof SilentScreen ? ((SilentScreen) this.currentScreen).getFpsLimit() : 30;
|
||||
|
||||
if(!Display.isActive()) {
|
||||
return 60;
|
||||
if(!Display.isActive() && Client.getInstance().getSettingsManager().getSettingByClass(FPSBoostMod.class, "Limit Unfocused FPS").getValBoolean()) {
|
||||
return Client.getInstance().getSettingsManager().getSettingByClass(FPSBoostMod.class, "Unfocused FPS Limit").getValInt();
|
||||
}
|
||||
|
||||
return this.gameSettings.limitFramerate;
|
||||
|
@ -38,6 +38,8 @@ public class FPSBoostMod extends Mod {
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
this.setUpdated(true);
|
||||
|
||||
ArrayList<String> lazyLoading = new ArrayList<String>();
|
||||
|
||||
lazyLoading.add("Off");
|
||||
@ -57,6 +59,8 @@ public class FPSBoostMod extends Mod {
|
||||
this.addBooleanSetting("Low Graphics Mode", this, false); // ready
|
||||
this.addBooleanSetting("Hud Optimization", this, false); // ready
|
||||
this.addBooleanSetting("Optimized Entity Movement", this, true);
|
||||
this.addBooleanSetting("Limit Unfocused FPS", this, true);
|
||||
this.addSliderSetting("Unfocused FPS Limit", this, 60, 10, 200, true);
|
||||
this.addModeSetting("Lazy Chunk Loading", this, "Balance", lazyLoading); // ready
|
||||
this.addModeSetting("Occlusion Culling", this, "Balance", entityCulling); // ready
|
||||
this.addBooleanSetting("Hide Tall Grass", this, false); // ready
|
||||
@ -107,7 +111,7 @@ public class FPSBoostMod extends Mod {
|
||||
return;
|
||||
}
|
||||
|
||||
if(setting.getName().equals("Optimized Entity Movement") || setting.getName().equals("Low Graphics Mode") || !setting.isCheck() || setting.getName().equals("Check glError") || setting.getName().equals("Do memory debug")) {
|
||||
if(setting.getName().equals("Optimized Entity Movement") || setting.getName().equals("Low Graphics Mode") || !setting.isCheck() || setting.getName().equals("Check glError") || setting.getName().equals("Do memory debug") || setting.getName().equals("Limit Unfocused FPS")) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user