Qt: Add hotkey support for toggling individual pnach cheats during gameplay - #14692
Qt: Add hotkey support for toggling individual pnach cheats during gameplay#14692Eudemir1986 wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Thank you for submitting a contribution to PCSX2
As this is your first pull request, please be aware of the contributing guidelines.
Additionally, as per recent changes in GitHub Actions, your pull request will need to be approved by a maintainer before GitHub Actions can run against it. You can find more information about this change here.
Please be patient until this happens. In the meantime if you'd like to confirm the builds are passing, you have the option of opening a PR on your own fork, just make sure your fork's master branch is up to date!
|
Rejecting per LLM policy. Leaving it to other members to override. https://pcsx2.net/docs/contributing/#large-language-model-llm-usage-policy |
|
Hi @RedPanda4552, The implementation logic was mine. I spent approximately 3 weeks reverse engineering the problem using PCSX2 EE Debugger, Cheat Engine, and RenderDoc before writing a single line of code. The decision to use Host::GetStringSettingValue, Host::Internal::GetGameSettingsLayer, VMManager::ReloadPatches, and the [CheatHotkeys] INI section was based on my own analysis of PCSX2's architecture. |
|
I've refactored the implementation based on feedback from the community and additional technical review. Centralized all logic into a single HotkeyToggleCheatSlot() helper function The diff went from +453 to approximately +95 lines. I'd appreciate if the team could reconsider reopening this PR. |
Description of Changes
Adds 16 configurable hotkey slots (
ToggleCheatSlot1toToggleCheatSlot16) under Controllers → Hotkeys → System. Each slot reads the target cheat name from a dedicated[CheatHotkeys]section inPCSX2.ini. When triggered, the hotkey toggles the named cheat on or off in real time and displays an OSD message confirming the state.Configuration Example
Pnach file (
9685E636.pnach):PCSX2.ini:Rationale behind Changes
Users currently have no way to toggle individual pnach cheats during gameplay without opening a menu. This is particularly useful for cheats that need to be toggled mid-game (e.g. 60fps patches that break cutscenes, visual filters that should only be active during specific gameplay moments).
Resolves: #12374, #4514, #5567, #10147, #11945, #841
Suggested Testing Steps
[Hotkeys]inPCSX2.ini[CheatHotkeys]inPCSX2.iniDid you use AI to help find, test, or implement this issue or feature?
Yes. Claude Sonnet 4.6 (Anthropic) was used throughout the implementation process for code guidance, debugging, and build system support. The author is not a developer and has no prior C++ or emulator development experience. The feature was researched and implemented over approximately 3 weeks of iterative sessions (June 19 – July 12, 2026), combining manual testing, runtime debugging with PCSX2 EE Debugger, Cheat Engine and RenderDoc, and AI-assisted code implementation.