MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / debug_trainer_event

Function debug_trainer_event

src/debug.cpp:9380–9397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9378}
9379
9380bool debug_trainer_event(int evt, int state)
9381{
9382 for (int i = 0; i < tpptrcnt; i++) {
9383 struct trainerpatch *tp = tpptr[i];
9384 for (int j = 0; j < tp->eventcount; j++) {
9385 if (tp->events[j] <= 0)
9386 continue;
9387 if (tp->events[j] == evt) {
9388 if (!state)
9389 return true;
9390 write_log(_T("Trainer %d ('%s') -> %s\n"), i, tp->name, tp->enabled ? _T("off") : _T("on"));
9391 debug_trainer_enable(tp, !tp->enabled);
9392 return true;
9393 }
9394 }
9395 }
9396 return false;
9397}
9398
9399bool debug_get_prefetch(int idx, uae_u16 *opword)
9400{

Callers 1

handle_input_event2Function · 0.85

Calls 2

debug_trainer_enableFunction · 0.85
write_logFunction · 0.70

Tested by

no test coverage detected