Skip to content

Commit

Permalink
Update comment on CorePickerUIData
Browse files Browse the repository at this point in the history
also restore systemid default core restore logic that exists for some reason
  • Loading branch information
Morilli committed Jul 8, 2024
1 parent 45002e6 commit bbb3b4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/BizHawk.Client.Common/config/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class Config
public static string ControlDefaultPath => Path.Combine(PathUtils.ExeDirectoryPath, "defctrl.json");

/// <remarks>
/// <c>AppliesTo[0]</c> is used as the group label, and
/// All SystemIDs in <c>AppliesTo</c> are used as group label, and
/// <c>Config.PreferredCores[AppliesTo[0]]</c> (lookup on global <see cref="Config"/> instance) determines which option is shown as checked.<br/>
/// The order within submenus and the order of the submenus themselves are determined by the declaration order here.
/// </remarks>
Expand Down
5 changes: 3 additions & 2 deletions src/BizHawk.Client.EmuHawk/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ ToolStripItem[] CreateWindowSizeFactorSubmenus()
{
// invalid --> default (doing this here rather than when reading config file to allow for hacked-in values, though I'm not sure if that could do anything at the moment --yoshi)
var defaultCore = coreNames[0];
Console.WriteLine($"setting preferred core for {appliesTo[0]} etc. to {defaultCore} (was {preferred ?? "null"})");
Config.PreferredCores[appliesTo[0]] = preferred = defaultCore;
Console.WriteLine($"setting preferred core for {submenu.Text} to {defaultCore} (was {preferred ?? "null"})");
preferred = defaultCore;
foreach (var sysID in appliesTo) Config.PreferredCores[sysID] = preferred;
}
foreach (ToolStripMenuItem entry in ((ToolStripMenuItem) openedSender).DropDownItems) entry.Checked = entry.Text == preferred;
};
Expand Down

0 comments on commit bbb3b4c

Please sign in to comment.