Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: whammoed on May 12, 2005, 05:42:21 pm

Title: help with AdvMenu code
Post by: whammoed on May 12, 2005, 05:42:21 pm
I am modifying the code:

         case EVENT_ROTATE : {
               unsigned mirror = rs.video_orientation_effective & (ADV_ORIENTATION_FLIP_X | ADV_ORIENTATION_FLIP_Y);
               unsigned flip = rs.video_orientation_effective & ADV_ORIENTATION_FLIP_XY;
               if (mirror == 0) {
                  mirror = ADV_ORIENTATION_FLIP_Y;
               } else if (mirror == ADV_ORIENTATION_FLIP_Y) {
                  mirror = ADV_ORIENTATION_FLIP_X | ADV_ORIENTATION_FLIP_Y;
               } else if (mirror == (ADV_ORIENTATION_FLIP_X | ADV_ORIENTATION_FLIP_Y)) {
                  mirror = ADV_ORIENTATION_FLIP_X;
               } else {
                  mirror = 0;
               }
               flip ^= ADV_ORIENTATION_FLIP_XY;
               rs.video_orientation_effective = flip | mirror;
            }

to change the behavior of the rotate button for a cocktail cab. Is it possible to know which key was pressed for the event_rotate at this point and if so what would the syntax be? I would like up, down, left, right keys to also rotate but only if the screen is not orientated towards that joystick.
 
thanks!