diff --git a/README.md b/README.md index 7a89247..925d70c 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Instead of editing the source code directly, the settings can be changed by edit "AcceptDelayFrame": 3, // Number of frames after selecting "Play" that RNG additions stop "Prompt": "> ", // The prompt string to display "Interactive": false, // If should prompt for parameters in case they're not supplied - "Win7": false // If should apply some settings to work better on Win7 + "GameFps": 60 // 61 for Windows 7 } ``` diff --git a/settings.json b/settings.json index 41b2f7b..1dffb8d 100644 --- a/settings.json +++ b/settings.json @@ -18,5 +18,5 @@ "AcceptDelayFrame": 3, "Prompt": "> ", "Interactive": false, - "Win7": false + "GameFps": 60 } diff --git a/src/Options.cs b/src/Options.cs index 12e2574..8352698 100644 --- a/src/Options.cs +++ b/src/Options.cs @@ -24,7 +24,7 @@ public class Options public int AcceptDelayFrame { get; set; } = 3; public string Prompt { get; set; } = "> "; public bool Interactive { get; set; } = false; - public bool Win7 { get; set; } = false; + public float GameFps { get; set; } = 60; public enum TOrder { diff --git a/src/Program.cs b/src/Program.cs index ecb13ef..d05311e 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -218,10 +218,10 @@ static uint RareTimer(uint state, Player player) var fps = _options.ConsoleFps; var start = DateTime.Now.SecondsSinceEpoch(); - var delay = _options.DelayFrame / 60f; + var delay = _options.DelayFrame / _options.GameFps; var incr = 0U; - var incrStart = delay - (_options.ForcedIncr / 60f); + var incrStart = delay - (_options.ForcedIncr / _options.GameFps); var timerWidth = 8; var width = Math.Min(Console.WindowWidth - 1 - timerWidth, 60); @@ -234,8 +234,7 @@ static uint RareTimer(uint state, Player player) var duration = DateTime.Now.SecondsSinceEpoch() - start; incr = (uint)Math.Max( - // jester reported that it works better as 63 on Win7 - Math.Round((duration - incrStart) * (_options.Win7 ? 63 : 60)), + Math.Round((duration - incrStart) * _options.GameFps), _options.ForcedIncr + _options.AcceptDelayFrame );