Skip to content

Commit

Permalink
prevent triggering of spawned touchscreen actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasiliy Horbachenko committed Feb 3, 2017
1 parent 6a9ca0c commit 535ca9a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/remap/remap.c
Expand Up @@ -329,14 +329,18 @@ void remap(remap_config_t config, SceCtrlData *mut_pad, SceTouchData *mut_front,

SceCtrlData pad;
memcpy(&pad, mut_pad, sizeof(pad));
SceTouchData front, back;
memcpy(&front, mut_front, sizeof(front));
memcpy(&back, mut_back, sizeof(back));

int spawned_buttons[TRIGGERS_BUTTONS_COUNT];
int spawned_buttons_i = 0;

for (int i = 0; i < config.size; i++) {
trigger_t trigger = config.triggers[i];

int type = trigger_type(trigger);
int trigger_test = remap_test_trigger(trigger, pad, *mut_front, *mut_back);
int trigger_test = remap_test_trigger(trigger, pad, front, back);
if (trigger_test >= 0) {
// prevent
bool should_prevent = true;
Expand Down

0 comments on commit 535ca9a

Please sign in to comment.