Skip to content

Commit

Permalink
set system time by default to current time
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddio0141 committed Jul 7, 2023
1 parent a99e2a3 commit 9146d01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Games

- Fixed Cat Quest not being TASable due to a bug in UniTAS
- Fixed DDLC launch on crash because out of range system time

### Compatibility

Expand All @@ -22,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### UniTAS

- Stopped setting unity running in background to false (this was causing issues with some games when you tab out)
- UniTAS system time by default is now the current time (until you run a movie)

# [v0.5.0] - 2023-07-04

Expand Down
5 changes: 4 additions & 1 deletion UniTAS/Patcher/Implementations/VirtualEnvironment/TimeEnv.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ public class TimeEnv : ITimeEnv, IOnPreUpdatesActual, IOnGameRestartResume, IOnS

private readonly ITimeWrapper _timeWrap;

public TimeEnv(IConfig config, ITimeWrapper timeWrap)
public TimeEnv(IConfig config, ITimeWrapper timeWrap, IPatchReverseInvoker patchReverseInvoker)
{
// start time to current time
StartupTime = patchReverseInvoker.Invoke(() => DateTime.Now);

_defaultFps = config.ConfigFile.Bind("General", "DefaultFps", 100f,
"Default FPS when the TAS isn't running. Make sure the FPS is more than 0");

Expand Down

0 comments on commit 9146d01

Please sign in to comment.