Skip to content

Commit

Permalink
Fixes #115 (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
highbyte authored Sep 12, 2024
1 parent 0a1f004 commit 189cc96
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/apps/Highbyte.DotNet6502.App.WASM/Pages/Index.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ public async Task ShowConfigUI<T>() where T : IComponent
var resultData = ((ISystemConfig UpdatedSystemConfig, IHostSystemConfig UpdatedHostSystemConfig))result.Data;

_wasmHost.UpdateSystemConfig(resultData.UpdatedSystemConfig);
await _wasmHost.PersistCurrentSystemConfig();
_wasmHost.UpdateHostSystemConfig(resultData.UpdatedHostSystemConfig);
}

Expand Down
2 changes: 1 addition & 1 deletion src/apps/Highbyte.DotNet6502.App.WASM/global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "8.0.303"
"version": "8.0.400"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ $publishDir = "./bin/Publish/"
$path = "/?audioEnabled=true"
if(Test-Path $publishDir) { del $publishDir -r -force }
dotnet publish -c Release -o $publishDir
dotnet serve -o:$path --directory "$($publishDir)wwwroot\"
dotnet serve --port 5001 -o:$path --directory "$($publishDir)wwwroot\"
8 changes: 4 additions & 4 deletions src/libraries/Highbyte.DotNet6502.Systems/HostApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,10 @@ public void UpdateSystemConfig(ISystemConfig newConfig)
_systemList.ChangeCurrentSystemConfig(_selectedSystemName, CurrentSystemConfig, _selectedSystemConfigurationVariant);
}

//public async Task PersistNewSystemConfig(ISystemConfig newConfig)
//{
// await _systemList.PersistNewSystemConfig(_selectedSystemName, newConfig);
//}
public async Task PersistCurrentSystemConfig()
{
await _systemList.PersistSystemConfig(_selectedSystemName, _selectedSystemConfigurationVariant);
}

public void UpdateHostSystemConfig(IHostSystemConfig newConfig)
{
Expand Down
10 changes: 5 additions & 5 deletions src/libraries/Highbyte.DotNet6502.Systems/SystemList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ public void ChangeCurrentSystemConfig(string systemName, ISystemConfig systemCon
// await PersistSystemConfig(systemName);
//}

//public async Task PersistSystemConfig(string systemName, string configurationVariant)
//{
// var systemConfig = await GetSystemConfig(systemName, configurationVariant);
// await _systemConfigurers[systemName].PersistConfig(systemConfig);
//}
public async Task PersistSystemConfig(string systemName, string configurationVariant)
{
var systemConfig = await GetSystemConfig(systemName, configurationVariant);
await _systemConfigurers[systemName].PersistConfig(systemConfig);
}

public async Task<bool> IsValidConfig(string systemName, string configurationVariant)
{
Expand Down

0 comments on commit 189cc96

Please sign in to comment.