dolphin-emulator/Source/Core/DolphinQt
cristian64 6d8ba94e4c DolphinQt: Extract creator name from code name in Gecko codes.
Gecko codes in Dolphin feature a dedicated field for the creator of the
cheat code. When saved into the INI file, the code name and the creator
name are concatenated, and then inserted in the `[Gecko]` section:

```ini
[Gecko]
$<cheat code name> [<creator>]
<code line 1>
<code line 2>
<code line 3>
<...>
$<other cheat code name> [<creator>]
<code line 1>
<code line 2>
<code line 3>
<...>
```

On the other hand, enabled codes are listed under the `[Gecko_Enabled]`
section, but in this case the creator name is omitted from the line:

```ini
[Gecko_Enabled]
$<cheat code name>
$<other cheat code name>
```

Having the creator name in the `[Gecko]` section but not in the
`[Gecko_Enabled]` section is arguably not ideal, but this is legacy
behavior in Dolphin.

The **Cheat Code Editor** dialog is not acknowledging this subtle
behavior in Dolphin: the cheat code name and the creator name *can* be
both inserted in the name field. This issue manifests as an inconsistent
state where a Gecko code that *appears* to be enabled has no effect when
the game is launched.

As part of this fix, the creator name (if present) is now moved into the
dedicated creator field before the code is stored internally.

Test plan:

- Right-click on any game and open the **Properties** dialog.
- Switch to the **Gecko Codes** tab.
- Press the **Add New Code...** button.
- In the **Cheat Code Editor** dialog:
  - Enter `This is a test [Jane Doe]` in the **Name:** field.
  - Enter `01234567 00000000` in the **Code:** field.
  - Press **Save**.
- Observe that the newly added code is now in the list, and *appears* to
  be enabled.
- Close the **Properties** dialog.
- Right-click on the same game and open the **Properties** dialog again.

**Without** the fix, the newly added code, while still on the list, has
been inadvertently disabled (it was never really enabled!).

**With** the fix, the newly added code is the list and remains enabled.

This fixes https://bugs.dolphin-emu.org/issues/13695.
2025-03-23 21:37:23 +00:00
..
Achievements Add Config Changed Callback for Hardcore Mode 2024-11-10 08:38:00 -05:00
Config DolphinQt: Extract creator name from code name in Gecko codes. 2025-03-23 21:37:23 +00:00
Debugger Modernize std::stable_sort with ranges and projections 2025-03-09 13:26:38 -07:00
FIFO Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivial 2024-10-15 17:08:55 +02:00
GameList DolphinQt: Add "Time Played" column to game list view 2025-02-16 23:15:11 +01:00
InfinityBase USB: Infinity window icon 2025-02-24 00:08:42 +02:00
NetPlay VideoConfig: Eliminate NetPlay related members. 2025-03-10 18:53:44 -05:00
QtUtils DolphinQt: Make input mapping and output testing non-blocking. 2025-01-01 16:48:32 -06:00
Settings Config: make SP2 configurable 2025-03-15 22:03:17 +00:00
SkylanderPortal DolphinQt: Ensure skylanders QDateTimeEdit shows a four digit year without forcing dd-mm-yyyy format. 2024-10-31 02:38:45 -05:00
Styles/Dark Made progress bars more legible in dark mode 2024-06-29 07:02:17 -04:00
TAS InputCommon/ControllerEmu: Break out functionality of EmulatedController 2025-03-15 14:30:43 -05:00
AboutDialog.cpp AboutDialog: Disable resizing the About window 2025-01-24 10:45:54 +01:00
AboutDialog.h
CheatSearchFactoryWidget.cpp Partially revert "Revert "Audit uses of IsRunning and GetState"" 2024-10-04 18:35:41 +02:00
CheatSearchFactoryWidget.h
CheatSearchWidget.cpp Fix random crash when using the cheat search 2024-09-23 22:47:44 -07:00
CheatSearchWidget.h DolphinQt: Allow Cheat Search to create multiple AR codes when selecting multiple lines. 2024-03-17 01:29:39 -05:00
CheatsManager.cpp Partially revert "Revert "Audit uses of IsRunning and GetState"" 2024-10-04 18:35:41 +02:00
CheatsManager.h CheatsManager: Create ARCodeWidget and GeckoCodeWidget only once. 2024-08-25 23:44:17 -07:00
CMakeLists.txt CMake: disable Qt deprecation warnings we can't fix 2025-02-23 14:18:05 +00:00
ConvertDialog.cpp Modernize std::none_of with ranges 2024-12-15 19:54:17 -08:00
ConvertDialog.h
DiscordHandler.cpp
DiscordHandler.h
DiscordJoinRequestDialog.cpp
DiscordJoinRequestDialog.h
DolphinEmu.entitlements DolphinQt: Remove entitlements for Steam overlay 2024-08-15 12:42:15 -04:00
DolphinEmuDebug.entitlements DolphinQt: Remove entitlements for Steam overlay 2024-08-15 12:42:15 -04:00
DolphinQt.manifest
DolphinQt.rc
DolphinQt.vcxproj AudioCommon: Added Granular Synthesis 2025-03-14 01:22:35 -05:00
DolphinQt.vcxproj.user
GBAHost.cpp
GBAHost.h
GBAWidget.cpp Core::RunOnCPUThread: Avoid Global System Accessor 2024-03-28 10:10:03 -07:00
GBAWidget.h GBAWidget: Add missing override specifiers 2023-12-13 10:12:18 -05:00
GCMemcardCreateNewDialog.cpp
GCMemcardCreateNewDialog.h
GCMemcardManager.cpp Remove redundant semicolons 2024-08-20 14:59:54 +02:00
GCMemcardManager.h
Host.cpp GDBStub: Signal Breakpoint Changes To Host 2024-11-15 15:12:11 -08:00
Host.h Host: Rename JitCacheInvalidation 2024-10-23 23:43:24 -07:00
HotkeyScheduler.cpp Merge pull request #13114 from TryTwo/PR_Turbo_Mutes_Audio 2024-10-19 13:11:05 -04:00
HotkeyScheduler.h Add Open Achievements Hotkey 2024-07-06 07:36:31 -04:00
Info.plist.in ScmRevGen: Don't generate Info.plist files directly 2024-12-05 14:56:08 -05:00
Main.cpp Enforce XCB within code 2025-01-20 11:57:21 +01:00
MainWindow.cpp Merge pull request #13151 from mitaclaw/core-global-system-6 2024-11-02 12:04:28 +00:00
MainWindow.h MainWindow: Avoid Global System Accessor 2024-10-24 21:41:35 -07:00
MenuBar.cpp DolphinQt: Add "Time Played" column to game list view 2025-02-16 23:15:11 +01:00
MenuBar.h DolphinQt: JIT Widget Refresh 2024-10-19 02:30:44 -07:00
NANDRepairDialog.cpp
NANDRepairDialog.h
NKitWarningDialog.cpp
NKitWarningDialog.h
pch_qt.cpp
pch_qt.h
qt.conf
qt.conf.win
qt6.natvis
RenderWidget.cpp Replace 'reinterpret_cast' with 'static_cast' 2024-11-08 07:26:47 +01:00
RenderWidget.h Remove rounded corners on emulation render window 2024-04-28 12:41:39 +03:00
resource.h
ResourcePackManager.cpp
ResourcePackManager.h
Resources.cpp
Resources.h
RiivolutionBootWidget.cpp Disable memory patches in hardcore mode 2023-12-02 16:41:16 -05:00
RiivolutionBootWidget.h Disable memory patches in hardcore mode 2023-12-02 16:41:16 -05:00
SearchBar.cpp
SearchBar.h
Settings.cpp DolphinQt: Use global settings object also for debugger settings. 2025-01-30 22:02:03 +00:00
Settings.h DolphinQt: Remove unneeded Win32 code 2024-09-27 10:41:01 +01:00
ToolBar.cpp Modernize std::max_element with ranges 2024-10-10 00:53:48 -07:00
ToolBar.h
Translation.cpp C++20: Synthesize operator!= From operator== 2024-10-10 20:23:55 -07:00
Translation.h
Updater.cpp DolphinQt: Properly Delete (Some) Widgets 2024-04-30 11:17:28 -07:00
Updater.h
WiiUpdate.cpp
WiiUpdate.h