-
Notifications
You must be signed in to change notification settings - Fork 450
Enable AutoSaveRAM by default #4644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -769,6 +769,8 @@ _argParser.SocketAddress is var (socketIP, socketPort) | |
| } | ||
| } | ||
| } | ||
| //TODO should we be calling `OnRomChanged` from this ctor? it handles this and a bunch of other things also done here | ||
| _trackingAutoSaveRAM = Config.AutosaveSaveRAM && MovieSession.Movie is null; | ||
|
|
||
| if (_argParser.startFullscreen || Config.StartFullscreen) | ||
| { | ||
|
|
@@ -1760,6 +1762,8 @@ public bool RunLibretroCoreChooser() | |
| public int AutoFlushSaveRamIn { get; set; } | ||
| private bool AutoFlushSaveRamFailed; | ||
|
|
||
| private bool _trackingAutoSaveRAM; | ||
|
|
||
| private void SetStatusBar() | ||
| { | ||
| if (!_inFullscreen) | ||
|
|
@@ -3011,7 +3015,7 @@ private void StepRunLoop_Core(bool force = false) | |
|
|
||
| RA?.OnFrameAdvance(); | ||
|
|
||
| if (Config.AutosaveSaveRAM) | ||
| if (_trackingAutoSaveRAM) | ||
| { | ||
| AutoFlushSaveRamIn--; | ||
| if (AutoFlushSaveRamIn <= 0) | ||
|
|
@@ -3897,6 +3901,7 @@ private void OnRomChanged() | |
| UpdateCoreStatusBarButton(); | ||
| UpdateDumpInfo(); | ||
| SetMainformMovieInfo(); | ||
| _trackingAutoSaveRAM = Config.AutosaveSaveRAM && MovieSession.Movie is null; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not work, because the movie has not been set yet at this point. If you open a ROM and then TAStudio right after starting EmuHawk, This should probably also be a value that just tracks if a movie was used, since a user may wish to change the auto save setting after opening a ROM. |
||
| RA?.Restart(); | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a ROM gets loaded, it should be getting called by the method that loads the ROM, e.g.
LoadRomthroughLoadRomInternal.