update type 8 extension

This commit is contained in:
tomvita 2025-01-05 22:07:14 +08:00
parent d00e14d2f9
commit 0eecd0fbf0
2 changed files with 2 additions and 4 deletions

View File

@ -231,7 +231,7 @@ Note: This is the direct output of `hidKeysDown()`.
+ 0800000: Right Stick Down
+ 1000000: SL
+ 2000000: SR
+ 8000000: when this is set button only activate code once per keydown, need to be release before the code will run again
+ 8000000: No auto-repeat. When this bit is set, the conditional block executes only once when the keypad mask matches. The mask must stop matching to reset for the next trigger.
---

View File

@ -1000,9 +1000,7 @@ namespace ams::dmnt::cheat::impl {
case CheatVmOpcodeType_BeginKeypressConditionalBlock:
/* Check for keypress. */
if (cur_opcode.begin_keypress_cond.key_mask > 0x8000000) {
const u64 kDown = ~keyold & kHeld;
if ((cur_opcode.begin_keypress_cond.key_mask & 0x7FFFFFF & kDown) != (cur_opcode.begin_keypress_cond.key_mask & 0x7FFFFFF)) {
if ((cur_opcode.begin_keypress_cond.key_mask & 0x7FFFFFF & kHeld) != (cur_opcode.begin_keypress_cond.key_mask & 0x7FFFFFF) || (cur_opcode.begin_keypress_cond.key_mask & 0x7FFFFFF & keyold) == (cur_opcode.begin_keypress_cond.key_mask & 0x7FFFFFF)) {
/* Keys not pressed. Skip conditional block. */
this->SkipConditionalBlock(true);
}