TASEmulators / TASEmulators/BizHawk

Deduplicate settings/syncsettings of linked (2x/3x/4x) cores

Open
#2,748 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Core: Gambatte Core: GBHawk Core: SMSHawk Meta
Dominant language
C#
Stars
2.8k
Forks
468
PR merge metrics
No merged PRs in 30d

Description

The hard part here is the autogenerated UI.

edit: GGHawkLink => SMSHawk mmmkay?


My suggestion is to use one instance of the non-link-core type per console (e.g. 2x GBHawk.GBSyncSettings instead of 1x GBHawkLink.GBLinkSyncSettings), and to set the props which apply to all consoles on all instances when saving from the UI. (And reading from the first when loading the UI.)

The UI generation code can differentiate per-console props with just one new attribute, either:

[SplitPerLinkedConsole] public GBHawk.GBHawk.GBSyncSettings.ConsoleModeType ConsoleMode { get; set; }
public bool GBACGB { get; set; }

or:

public GBHawk.GBHawk.GBSyncSettings.ConsoleModeType ConsoleMode { get; set; }
[SharedForLinkedConsoles] public bool GBACGB { get; set; }

where the current code looks like:

public GBHawk.GBHawk.GBSyncSettings.ConsoleModeType ConsoleMode_L { get; set; }
public GBHawk.GBHawk.GBSyncSettings.ConsoleModeType ConsoleMode_R { get; set; }
public bool GBACGB { get; set; }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the autogenerated UI and the linked-core settings/syncsettings described in the issue, comparing the per-console and shared properties. Done means linked cores use one non-link-core settings instance per console, shared properties save to and load from the appropriate instances, and per-console properties remain distinct.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.