Add CheatEngine and support for Gateway cheats (#4406)

* Add CheatEngine; Add support for Gateway cheats; Add Cheat UI

* fix a potential crash on some systems

* fix substr with negative length

* Add Joker to the NonOp comp handling

* Fixup JokerOp

* minor fixup in patchop; add todo for nested loops

* Add comment for PadState member variable in HID

* fix: stol to stoul in parsing cheat file

* fix misplaced parsing of values; fix patchop code

* add missing break

* Make read_func and write_func a template parameter
This commit is contained in:
Ben
2018-11-16 18:01:10 -07:00
committed by James Rowe
parent 560df843b1
commit b90ff739a0
23 changed files with 1052 additions and 1 deletions
+4 -1
View File
@@ -74,7 +74,6 @@ void Module::UpdatePadCallback(u64 userdata, s64 cycles_late) {
if (is_device_reload_pending.exchange(false))
LoadInputDevices();
PadState state;
using namespace Settings::NativeButton;
state.a.Assign(buttons[A - BUTTON_HID_BEGIN]->GetStatus());
state.b.Assign(buttons[B - BUTTON_HID_BEGIN]->GetStatus());
@@ -394,6 +393,10 @@ void Module::ReloadInputDevices() {
is_device_reload_pending.store(true);
}
const PadState& Module::GetState() const {
return state;
}
std::shared_ptr<Module> GetModule(Core::System& system) {
auto hid = system.ServiceManager().GetService<Service::HID::Module::Interface>("hid:USER");
if (!hid)