From a8fd28c64066aaf2ddde06e92c0671d9fe090a75 Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke <grumbel@gmx.de> Date: Fri, 26 Dec 2008 07:14:59 +0100 Subject: [PATCH] Changed order of modifier stack so that you can have autofire and non-autofire buttons mapped to the same event --- xboxdrv.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xboxdrv.cpp b/xboxdrv.cpp index 3da1a20..67f9ca9 100644 --- a/xboxdrv.cpp +++ b/xboxdrv.cpp @@ -1149,18 +1149,18 @@ void controller_loop(uInput* uinput, XboxGenericController* controller, CommandL if (opts.square_axis) apply_square_axis(msg); - if (!opts.button_map.empty()) - apply_button_map(msg, opts.button_map); - - if (!opts.axis_map.empty()) - apply_axis_map(msg, opts.axis_map); - if (autofire_modifier.get()) autofire_modifier->update(delta, msg); if (relative_axis_modifier.get()) relative_axis_modifier->update(delta, msg); + if (!opts.button_map.empty()) + apply_button_map(msg, opts.button_map); + + if (!opts.axis_map.empty()) + apply_axis_map(msg, opts.axis_map); + if (memcmp(&msg, &oldmsg, sizeof(XboxGenericMsg))) { // Only send a new event out if something has changed, // this is useful since some controllers send events