It is currently Thu Oct 19, 2017 11:24 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Sep 21, 2016 5:39 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 709
Location: New York, NY
The Select and Start buttons are erroneously swapped in the Mahjong controller. In the code snippet below (from NstApiInput.hpp), the values for the associated constants need to be swapped to fix this. In fact, just like the standard gamepad controller, Select appears to the left of Start on the Mahjong controller and all of the other constants in the snippet below are ordered in the same left-to-right button ordering as that appears on the actual controller, with the exception of Select and Start.

Code:
            /**
            * Mahjong.
            */
            struct Mahjong
            {
               enum
               {
                  PART_1        = 0x02,
                  PART_1_I      = 0x80,
                  PART_1_J      = 0x40,
                  PART_1_K      = 0x20,
                  PART_1_L      = 0x10,
                  PART_1_M      = 0x08,
                  PART_1_N      = 0x04,
                  PART_2        = 0x04,
                  PART_2_A      = 0x80,
                  PART_2_B      = 0x40,
                  PART_2_C      = 0x20,
                  PART_2_D      = 0x10,
                  PART_2_E      = 0x08,
                  PART_2_F      = 0x04,
                  PART_2_G      = 0x02,
                  PART_2_H      = 0x01,
                  PART_3        = 0x06,
                  PART_3_START  = 0x80,
                  PART_3_SELECT = 0x40,
                  PART_3_KAN    = 0x20,
                  PART_3_PON    = 0x10,
                  PART_3_CHI    = 0x08,
                  PART_3_REACH  = 0x04,
                  PART_3_RON    = 0x02,
                  NUM_PARTS     = 3
               };

               uint buttons;

               Mahjong()
               : buttons(0) {}

               typedef bool (NST_CALLBACK *PollCallback) (void*,Mahjong&,uint);

               static PollCaller2<Mahjong> callback;
            };


Top
 Profile  
 
PostPosted: Sat Sep 24, 2016 4:28 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
Can you review the relevant NestopiaUE code and see if this still applies? If so, can you please file a GitHub Issues request that outlines this problem and/or include a patch or submit a pull req? Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group