Closed RyanWalpole closed 1 year ago
Found the issue in the code that is executed when the application is exited.
DoApplicationSettingSave( );
FileWrite.AppendText("$CheckSMAPIUpdateOnStartup=" + Properties.Settings.Default.CheckSMAPIUpdateOnStartup);
FileWrite.AppendText("$ColorProfile=" + Properties.Settings.Default.ColorProfile);
Issue actually extends to the "CheckSMAPIUpdateOnStartup" setting as well. Results in the file being saved as follows:
Broken Settings.INI
$StardewDir=C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\
$ModsDir=C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\\Mods\
$InactiveModsDir=C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\\inactive-mods\
$PresetsDir=C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\\mod-presets\
$CheckUpdateOnStartup=TRUE
$IsManuallyReset=FALSE
$CheckSMAPIUpdateOnStartup=====FALSE$ColorProfile=PINK$ColorProfile====FALSE=PINK$ColorProfile=PINK
Correct Settings.INI
$StardewDir=C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\
$ModsDir=C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\\Mods\
$InactiveModsDir=C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\\inactive-mods\
$PresetsDir=C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\\mod-presets\
$CheckUpdateOnStartup=FALSE
$IsManuallyReset=FALSE
$CheckSMAPIUpdateOnStartup=FALSE
$ColorProfile=PINK
Issue Overview
The issue is that the DoApplicationSettingSave();
function does not separate the FileWrite.AppendText();
for the SMAPI Update and Color Profile with an Environment.NewLine;
.
For example:
Existing Code (Not Working)
FileWrite.AppendText("$CheckSMAPIUpdateOnStartup=" + Properties.Settings.Default.CheckSMAPIUpdateOnStartup);
FileWrite.AppendText("$ColorProfile=" + Properties.Settings.Default.ColorProfile);
Updated Code (Fixes Issue)
FileWrite.AppendText("$CheckSMAPIUpdateOnStartup=" +
Properties.Settings.Default.CheckSMAPIUpdateOnStartup + Environment.NewLine);
FileWrite.AppendText("$ColorProfile=" + Properties.Settings.Default.ColorProfile + Environment.NewLine);
The Issue or Bug
Whatever theme the user has selected does not carry over after updating the application, often not even selecting "Colourful - Pink" as the default.
Version
220901 (observed), 220802 (assumed)
Operating System
Windows 11
Steps to reproduce the behavior
Log Files
No response
Screenshots
No response
Additional Context
No response
Suggested Resolution
No response