mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
fix: delta d bench was broken
This commit is contained in:
@@ -405,6 +405,7 @@ public class App implements ApplicationListener {
|
||||
initialiseConfig();
|
||||
readConfigJson();
|
||||
setGamepadButtonLabels();
|
||||
rectifyConfigs();
|
||||
|
||||
|
||||
ShaderProgram.pedantic = false;
|
||||
@@ -1710,4 +1711,14 @@ public class App implements ApplicationListener {
|
||||
public static void inputStrobed(TerrarumKeyboardEvent event) {
|
||||
currentScreen.inputStrobed(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Corrects out-of-range config values
|
||||
*/
|
||||
private static void rectifyConfigs() {
|
||||
// force set min autosave interval to 5 minutes
|
||||
if (getConfigInt("autosaveinterval") < 5 * 60000) {
|
||||
setConfig("autosaveinterval", 5 * 60000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -617,7 +617,7 @@ open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
|
||||
|
||||
// some sketchy test code here
|
||||
|
||||
KeyToggler.forceSet(App.getConfigInt("debug_key_deltat_benchmark"), false)
|
||||
KeyToggler.forceSet(Input.Keys.F2, false)
|
||||
|
||||
}// END enter
|
||||
|
||||
@@ -853,7 +853,7 @@ open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
|
||||
|
||||
WORLD_UPDATE_TIMER += 1
|
||||
|
||||
if (KeyToggler.isOn(App.getConfigInt("debug_key_deltat_benchmark"))) {
|
||||
if (KeyToggler.isOn(Input.Keys.F2)) {
|
||||
deltaTeeBenchmarks.appendHead(1f / Gdx.graphics.deltaTime)
|
||||
|
||||
if (deltaTeeCleared) deltaTeeCleared = false
|
||||
|
||||
@@ -25,7 +25,7 @@ class UIPerformanceControlPanel(remoCon: UIRemoCon?) : UICanvas() {
|
||||
init {
|
||||
ControlPanelCommon.register(this, width, "basegame.performancecontrolpanel", arrayOf(
|
||||
arrayOf("", { Lang["MENU_OPTIONS_GAMEPLAY"] }, "h1"),
|
||||
arrayOf("autosaveinterval", { Lang["MENU_OPTIONS_AUTOSAVE"] + " (${Lang["CONTEXT_TIME_MINUTE_PLURAL"]})" }, "spinnerimul,1,120,1,60000"),
|
||||
arrayOf("autosaveinterval", { Lang["MENU_OPTIONS_AUTOSAVE"] + " (${Lang["CONTEXT_TIME_MINUTE_PLURAL"]})" }, "spinnerimul,5,120,5,60000"),
|
||||
arrayOf("notificationshowuptime", { Lang["MENU_OPTIONS_NOTIFICATION_DISPLAY_DURATION"] + " (${Lang["CONTEXT_TIME_SECOND_PLURAL"]})" }, "spinnerimul,2,10,1,1000"),
|
||||
arrayOf("", { Lang["MENU_LABEL_GRAPHICS"] }, "h1"),
|
||||
arrayOf("atlastexsize", { Lang["MENU_OPTIONS_ATLAS_TEXTURE_SIZE"] }, "spinnersel,1024,2048,4096,8192"),
|
||||
|
||||
Reference in New Issue
Block a user