Skip to content

Commit

Permalink
Win7 settings
Browse files Browse the repository at this point in the history
  • Loading branch information
fhelwanger committed Apr 18, 2021
1 parent caba284 commit 246042b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Instead of editing the source code directly, the settings can be changed by edit
"ForcedIncr": 10, // Number of RNG additions when "Play" is selected
"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
"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
}
```

Expand Down
3 changes: 2 additions & 1 deletion settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"ForcedIncr": 10,
"AcceptDelayFrame": 3,
"Prompt": "> ",
"Interactive": false
"Interactive": false,
"Win7": false
}
1 change: 1 addition & 0 deletions src/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +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 enum TOrder
{
Expand Down
3 changes: 2 additions & 1 deletion src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ static uint RareTimer(uint state, Player player)
var duration = DateTime.Now.SecondsSinceEpoch() - start;

incr = (uint)Math.Max(
Math.Round((duration - incrStart) * 60),
// jester reported that it works better as 63 on Win7
Math.Round((duration - incrStart) * (_options.Win7 ? 63 : 60)),
_options.ForcedIncr + _options.AcceptDelayFrame
);

Expand Down

0 comments on commit 246042b

Please sign in to comment.