Project64-input: Flip x/y axis in structure

This commit is contained in:
zilmar 2020-07-07 11:36:10 +09:30
parent 09de7617bf
commit 00556d4524
5 changed files with 12 additions and 12 deletions

View File

@ -68,9 +68,9 @@ typedef union
unsigned Reserved1 : 1; unsigned Reserved1 : 1;
unsigned Reserved2 : 1; unsigned Reserved2 : 1;
signed Y_AXIS : 8;
signed X_AXIS : 8; signed X_AXIS : 8;
signed Y_AXIS : 8;
}; };
} BUTTONS; } BUTTONS;
#pragma warning(pop) #pragma warning(pop)

View File

@ -149,7 +149,7 @@ void CControl_Plugin::UpdateKeys(void)
if (!m_AllocatedControllers) { return; } if (!m_AllocatedControllers) { return; }
for (int32_t cont = 0; cont < sizeof(m_Controllers) / sizeof(m_Controllers[0]); cont++) for (int32_t cont = 0; cont < sizeof(m_Controllers) / sizeof(m_Controllers[0]); cont++)
{ {
if (!m_Controllers[cont]->m_Present) { continue; } if (!m_Controllers[cont]->Present()) { continue; }
if (!m_Controllers[cont]->m_RawData) if (!m_Controllers[cont]->m_RawData)
{ {
GetKeys(cont, &m_Controllers[cont]->m_Buttons); GetKeys(cont, &m_Controllers[cont]->m_Buttons);

View File

@ -37,9 +37,9 @@ typedef union
unsigned Reserved1 : 1; unsigned Reserved1 : 1;
unsigned Reserved2 : 1; unsigned Reserved2 : 1;
signed Y_AXIS : 8;
signed X_AXIS : 8; signed X_AXIS : 8;
signed Y_AXIS : 8;
}; };
} BUTTONS; } BUTTONS;
#pragma warning(pop) #pragma warning(pop)
@ -76,7 +76,7 @@ class CCONTROL
{ {
public: public:
CCONTROL(int32_t &Present, int32_t &RawData, int32_t &PlugType); CCONTROL(int32_t &Present, int32_t &RawData, int32_t &PlugType);
inline bool Present(void) const { return m_Present != 0; } inline bool Present(void) const { return m_Present != 0; }
inline uint32_t Buttons(void) const { return m_Buttons.Value; } inline uint32_t Buttons(void) const { return m_Buttons.Value; }
inline PluginType Plugin(void) const { return static_cast<PluginType>(m_PlugType); } inline PluginType Plugin(void) const { return static_cast<PluginType>(m_PlugType); }
private: private:
@ -84,8 +84,8 @@ private:
int32_t & m_Present; int32_t & m_Present;
int32_t & m_RawData; int32_t & m_RawData;
int32_t & m_PlugType; int32_t & m_PlugType;
BUTTONS m_Buttons; BUTTONS m_Buttons;
CCONTROL(void); // Disable default constructor CCONTROL(void); // Disable default constructor
CCONTROL(const CCONTROL&); // Disable copy constructor CCONTROL(const CCONTROL&); // Disable copy constructor

View File

@ -72,9 +72,9 @@ typedef union
unsigned Reserved1 : 1; unsigned Reserved1 : 1;
unsigned Reserved2 : 1; unsigned Reserved2 : 1;
signed Y_AXIS : 8;
signed X_AXIS : 8; signed X_AXIS : 8;
signed Y_AXIS : 8;
}; };
} BUTTONS; } BUTTONS;

View File

@ -82,9 +82,9 @@ extern "C" {
unsigned Reserved1 : 1; unsigned Reserved1 : 1;
unsigned Reserved2 : 1; unsigned Reserved2 : 1;
signed Y_AXIS : 8;
signed X_AXIS : 8; signed X_AXIS : 8;
signed Y_AXIS : 8;
}; };
} BUTTONS; } BUTTONS;