mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 14:46:49 +01:00
Merge pull request #1936 from lioncash/kb
Minor keyboard-related cleanups.
This commit is contained in:
commit
db690a1862
@ -409,12 +409,6 @@
|
|||||||
<ClCompile Include="HW\Sram.cpp">
|
<ClCompile Include="HW\Sram.cpp">
|
||||||
<Filter>HW %28Flipper/Hollywood%29\EXI - Expansion Interface</Filter>
|
<Filter>HW %28Flipper/Hollywood%29\EXI - Expansion Interface</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="HW\GCKeyboard.cpp">
|
|
||||||
<Filter>HW %28Flipper/Hollywood%29\GCPad</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="HW\GCKeyboardEmu.cpp">
|
|
||||||
<Filter>HW %28Flipper/Hollywood%29\GCPad</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="HW\GCMemcard.cpp">
|
<ClCompile Include="HW\GCMemcard.cpp">
|
||||||
<Filter>HW %28Flipper/Hollywood%29\GCMemcard</Filter>
|
<Filter>HW %28Flipper/Hollywood%29\GCMemcard</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -718,6 +712,14 @@
|
|||||||
<ClCompile Include="PowerPC\JitILCommon\IR.cpp">
|
<ClCompile Include="PowerPC\JitILCommon\IR.cpp">
|
||||||
<Filter>PowerPC\JitILCommon</Filter>
|
<Filter>PowerPC\JitILCommon</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="HW\SI_GCAdapter.cpp" />
|
||||||
|
<ClCompile Include="PowerPC\JitCommon\JitBackpatch.cpp" />
|
||||||
|
<ClCompile Include="HW\GCKeyboardEmu.cpp">
|
||||||
|
<Filter>HW %28Flipper/Hollywood%29\GCKeyboard</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="HW\GCKeyboard.cpp">
|
||||||
|
<Filter>HW %28Flipper/Hollywood%29\GCKeyboard</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="BootManager.h" />
|
<ClInclude Include="BootManager.h" />
|
||||||
@ -727,7 +729,6 @@
|
|||||||
<ClInclude Include="CoreTiming.h" />
|
<ClInclude Include="CoreTiming.h" />
|
||||||
<ClInclude Include="ec_wii.h" />
|
<ClInclude Include="ec_wii.h" />
|
||||||
<ClInclude Include="Host.h" />
|
<ClInclude Include="Host.h" />
|
||||||
<ClCompile Include="MachineContext.h" />
|
|
||||||
<ClInclude Include="MemTools.h" />
|
<ClInclude Include="MemTools.h" />
|
||||||
<ClInclude Include="Movie.h" />
|
<ClInclude Include="Movie.h" />
|
||||||
<ClInclude Include="NetPlayClient.h" />
|
<ClInclude Include="NetPlayClient.h" />
|
||||||
@ -937,12 +938,6 @@
|
|||||||
<ClInclude Include="HW\Sram.h">
|
<ClInclude Include="HW\Sram.h">
|
||||||
<Filter>HW %28Flipper/Hollywood%29\EXI - Expansion Interface</Filter>
|
<Filter>HW %28Flipper/Hollywood%29\EXI - Expansion Interface</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="HW\GCKeyboard.h">
|
|
||||||
<Filter>HW %28Flipper/Hollywood%29\GCPad</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="HW\GCKeyboardEmu.h">
|
|
||||||
<Filter>HW %28Flipper/Hollywood%29\GCPad</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="HW\GCMemcard.h">
|
<ClInclude Include="HW\GCMemcard.h">
|
||||||
<Filter>HW %28Flipper/Hollywood%29\GCMemcard</Filter>
|
<Filter>HW %28Flipper/Hollywood%29\GCMemcard</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@ -1222,6 +1217,14 @@
|
|||||||
<ClInclude Include="PowerPC\JitILCommon\IR.h">
|
<ClInclude Include="PowerPC\JitILCommon\IR.h">
|
||||||
<Filter>PowerPC\JitILCommon</Filter>
|
<Filter>PowerPC\JitILCommon</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="HW\SI_GCAdapter.h" />
|
||||||
|
<ClInclude Include="MachineContext.h" />
|
||||||
|
<ClInclude Include="HW\GCKeyboardEmu.h">
|
||||||
|
<Filter>HW %28Flipper/Hollywood%29\GCKeyboard</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="HW\GCKeyboard.h">
|
||||||
|
<Filter>HW %28Flipper/Hollywood%29\GCKeyboard</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Text Include="CMakeLists.txt" />
|
<Text Include="CMakeLists.txt" />
|
||||||
|
@ -217,28 +217,28 @@ GCKeyboard::GCKeyboard(const unsigned int index) : m_index(index)
|
|||||||
{
|
{
|
||||||
// buttons
|
// buttons
|
||||||
groups.emplace_back(m_keys0x = new Buttons(_trans("Keys")));
|
groups.emplace_back(m_keys0x = new Buttons(_trans("Keys")));
|
||||||
for (unsigned int i = 0; i < sizeof(named_keys0) / sizeof(*named_keys0); ++i)
|
for (const char* key : named_keys0)
|
||||||
m_keys0x->controls.emplace_back(new ControlGroup::Input(named_keys0[i]));
|
m_keys0x->controls.emplace_back(new ControlGroup::Input(key));
|
||||||
|
|
||||||
groups.emplace_back(m_keys1x = new Buttons(_trans("Keys")));
|
groups.emplace_back(m_keys1x = new Buttons(_trans("Keys")));
|
||||||
for (unsigned int i = 0; i < sizeof(named_keys1) / sizeof(*named_keys1); ++i)
|
for (const char* key : named_keys1)
|
||||||
m_keys1x->controls.emplace_back(new ControlGroup::Input(named_keys1[i]));
|
m_keys1x->controls.emplace_back(new ControlGroup::Input(key));
|
||||||
|
|
||||||
groups.emplace_back(m_keys2x = new Buttons(_trans("Keys")));
|
groups.emplace_back(m_keys2x = new Buttons(_trans("Keys")));
|
||||||
for (unsigned int i = 0; i < sizeof(named_keys2) / sizeof(*named_keys2); ++i)
|
for (const char* key : named_keys2)
|
||||||
m_keys2x->controls.emplace_back(new ControlGroup::Input(named_keys2[i]));
|
m_keys2x->controls.emplace_back(new ControlGroup::Input(key));
|
||||||
|
|
||||||
groups.emplace_back(m_keys3x = new Buttons(_trans("Keys")));
|
groups.emplace_back(m_keys3x = new Buttons(_trans("Keys")));
|
||||||
for (unsigned int i = 0; i < sizeof(named_keys3) / sizeof(*named_keys3); ++i)
|
for (const char* key : named_keys3)
|
||||||
m_keys3x->controls.emplace_back(new ControlGroup::Input(named_keys3[i]));
|
m_keys3x->controls.emplace_back(new ControlGroup::Input(key));
|
||||||
|
|
||||||
groups.emplace_back(m_keys4x = new Buttons(_trans("Keys")));
|
groups.emplace_back(m_keys4x = new Buttons(_trans("Keys")));
|
||||||
for (unsigned int i = 0; i < sizeof(named_keys4) / sizeof(*named_keys4); ++i)
|
for (const char* key : named_keys4)
|
||||||
m_keys4x->controls.emplace_back(new ControlGroup::Input(named_keys4[i]));
|
m_keys4x->controls.emplace_back(new ControlGroup::Input(key));
|
||||||
|
|
||||||
groups.emplace_back(m_keys5x = new Buttons(_trans("Keys")));
|
groups.emplace_back(m_keys5x = new Buttons(_trans("Keys")));
|
||||||
for (unsigned int i = 0; i < sizeof(named_keys5) / sizeof(*named_keys5); ++i)
|
for (const char* key : named_keys5)
|
||||||
m_keys5x->controls.emplace_back(new ControlGroup::Input(named_keys5[i]));
|
m_keys5x->controls.emplace_back(new ControlGroup::Input(key));
|
||||||
|
|
||||||
|
|
||||||
// options
|
// options
|
||||||
|
@ -51,8 +51,7 @@ int CSIDevice_Keyboard::RunBuffer(u8* _pBuffer, int _iLength)
|
|||||||
|
|
||||||
KeyboardStatus CSIDevice_Keyboard::GetKeyboardStatus()
|
KeyboardStatus CSIDevice_Keyboard::GetKeyboardStatus()
|
||||||
{
|
{
|
||||||
KeyboardStatus KeyStatus;
|
KeyboardStatus KeyStatus = {};
|
||||||
memset(&KeyStatus, 0, sizeof(KeyStatus));
|
|
||||||
Keyboard::GetStatus(ISIDevice::m_iDeviceNumber, &KeyStatus);
|
Keyboard::GetStatus(ISIDevice::m_iDeviceNumber, &KeyStatus);
|
||||||
return KeyStatus;
|
return KeyStatus;
|
||||||
}
|
}
|
||||||
|
@ -50,17 +50,17 @@ public:
|
|||||||
CSIDevice_Keyboard(SIDevices device, int _iDeviceNumber);
|
CSIDevice_Keyboard(SIDevices device, int _iDeviceNumber);
|
||||||
|
|
||||||
// Run the SI Buffer
|
// Run the SI Buffer
|
||||||
virtual int RunBuffer(u8* _pBuffer, int _iLength) override;
|
int RunBuffer(u8* _pBuffer, int _iLength) override;
|
||||||
|
|
||||||
// Return true on new data
|
// Return true on new data
|
||||||
virtual bool GetData(u32& _Hi, u32& _Low) override;
|
bool GetData(u32& _Hi, u32& _Low) override;
|
||||||
|
|
||||||
virtual KeyboardStatus GetKeyboardStatus();
|
KeyboardStatus GetKeyboardStatus();
|
||||||
virtual void MapKeys(KeyboardStatus& KeyStatus, u8* key);
|
void MapKeys(KeyboardStatus& KeyStatus, u8* key);
|
||||||
|
|
||||||
// Send a command directly
|
// Send a command directly
|
||||||
virtual void SendCommand(u32 _Cmd, u8 _Poll) override;
|
void SendCommand(u32 _Cmd, u8 _Poll) override;
|
||||||
|
|
||||||
// Savestate support
|
// Savestate support
|
||||||
virtual void DoState(PointerWrap& p) override;
|
void DoState(PointerWrap& p) override;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user