Skip to content
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

Core: Combine Gecko cheat code name and creator name into a single field. #13218

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cristian64
Copy link
Contributor

This aligns Gecko codes with Action Replay codes, where the distinction between code name and creator name has never existed.

The main objective of the change is to address potential inconsistencies where two Gecko codes of the same name but of different creator can coexist in the INI file but cannot be individually enabled in Dolphin.

This was a valid scenario prior to these changes:

[Gecko]
$Infinite Power [Alice]
<code line 1>
<code line 2>
<code line 3>
<...>
$Infinite Power [Bob]
<code line 1>
<code line 2>
<code line 3>
<...>
[Gecko_Enabled]
$Infinite Power

Notice that, previously, enabled cheat codes in the [Gecko_Enabled] section would only include the cheat code name excluding the creator name (which was technically a different field in Dolphin's data structures).

Now, the equivalent INI document lists the cheat code full name (including the creator name), allowing both codes to be enabled
separately:

[Gecko]
$Infinite Power [Alice]
<code line 1>
<code line 2>
<code line 3>
<...>
$Infinite Power [Bob]
<code line 1>
<code line 2>
<code line 3>
<...>
[Gecko_Enabled]
$Infinite Power [Alice]

For backwards compatibility, if an enabled cheat code is not found among the available cheat codes, there will be a second attempt to find a match by disregarding the creator name from the available Gecko codes.

This also fixes https://bugs.dolphin-emu.org/issues/13695.

@cristian64
Copy link
Contributor Author

#13217 and #13218 are mutually exclusive.

@cristian64
Copy link
Contributor Author

This PR is more invasive than #13217, as it changes the way in which the [Gecko_Enabled] section in the INI file is written by Dolphin (the creator name is no longer removed from the cheat code name).

While the change remains backwards compatible (see second commit in the PR), it will present some issues when Gecko codes saved by a newer Dolphin version are then loaded in an older Dolphin version. The cheat codes will be preserved, but their enability state will be lost.

@cristian64 cristian64 force-pushed the combine_gecko_name_creator_name branch from 262692e to 8e0fdd5 Compare December 10, 2024 19:47
…eld.

This aligns Gecko codes with Action Replay codes, where the distinction
between code name and creator name has never existed.

The main objective of the change is to address potential inconsistencies
where two Gecko codes of the same name but of different creator can
coexist in the `INI` file but cannot be individually enabled in Dolphin.

This was a valid scenario prior to these changes:

```ini
[Gecko]
$Infinite Power [Alice]
<code line 1>
<code line 2>
<code line 3>
<...>
$Infinite Power [Bob]
<code line 1>
<code line 2>
<code line 3>
<...>
[Gecko_Enabled]
$Infinite Power
```

Notice that, previously, enabled cheat codes in the `[Gecko_Enabled]`
section would only include the cheat code name excluding the creator
name (which was technically a different field in Dolphin's data
structures).

Now, the equivalent INI document lists the cheat code full name
(including the creator name), allowing both codes to be enabled
separately:

```ini
[Gecko]
$Infinite Power [Alice]
<code line 1>
<code line 2>
<code line 3>
<...>
$Infinite Power [Bob]
<code line 1>
<code line 2>
<code line 3>
<...>
[Gecko_Enabled]
$Infinite Power [Alice]
```

This also fixes https://bugs.dolphin-emu.org/issues/13695.
This is a follow-up to the previous commit, where the cheat code name
and the creator name have been combined into a single field.

For backwards compatibility, if an *enabled* cheat code is not found
among the available cheat codes, there will be a second attempt to
find a match by disregarding the creator name from the available Gecko
codes.
@cristian64 cristian64 force-pushed the combine_gecko_name_creator_name branch from 8e0fdd5 to 5902e89 Compare December 10, 2024 20:31
@LillyJadeKatrin
Copy link
Contributor

LillyJadeKatrin commented Dec 12, 2024

I definitely don't have the authority to speak fully on this but I would prefer #13217 entirely because of how much trouble this one is going to cause against #13204.

@cristian64
Copy link
Contributor Author

I definitely don't have the authority to speak fully on this but I would prefer #13217 entirely because of how much trouble this one is going to cause against #13204.

To clarify, the changes proposed here would not affect #13204. Because it only changes how enabled codes are stored in the INI file, and as far as I know none of the built-in cheat codes are enabled by default.

I think, for the time being, #13217 is a simpler solution, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants