Added GameCube Keyboard support.

This commit is contained in:
skidau
2015-01-17 09:36:05 +11:00
parent 9d9ffa5b83
commit 5e8ab05cc0
20 changed files with 1117 additions and 22 deletions

View File

@ -39,6 +39,7 @@
#include "Core/HW/CPU.h"
#include "Core/HW/DSP.h"
#include "Core/HW/EXI.h"
#include "Core/HW/GCKeyboard.h"
#include "Core/HW/GCPad.h"
#include "Core/HW/GPFifo.h"
#include "Core/HW/HW.h"
@ -360,7 +361,14 @@ void EmuThread()
return;
}
Pad::Initialize(s_window_handle);
for (unsigned int port_num = 0; port_num < 4; port_num++)
{
if (SConfig::GetInstance().m_SIDevice[port_num] == SIDEVICE_GC_KEYBOARD)
Keyboard::Initialize(s_window_handle);
else
Pad::Initialize(s_window_handle);
}
// Load and Init Wiimotes - only if we are booting in Wii mode
if (core_parameter.bWii)
{
@ -475,7 +483,13 @@ void EmuThread()
INFO_LOG(CONSOLE, "%s", StopMessage(false, "Shutting down HW").c_str());
HW::Shutdown();
INFO_LOG(CONSOLE, "%s", StopMessage(false, "HW shutdown").c_str());
Pad::Shutdown();
for (unsigned int port_num = 0; port_num < 4; port_num++)
{
if (SConfig::GetInstance().m_SIDevice[port_num] == SIDEVICE_GC_KEYBOARD)
Keyboard::Shutdown();
else
Pad::Shutdown();
}
Wiimote::Shutdown();
g_video_backend->Shutdown();
AudioCommon::ShutdownSoundStream();