Some small fixes

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1781 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2009-01-05 00:10:19 +00:00
parent 442f47df4c
commit 7d08aed4c1
3 changed files with 11 additions and 7 deletions

View File

@ -38,17 +38,16 @@ files = ["Console.cpp",
"HW/EXI_DeviceAD16.cpp",
"HW/EXI_DeviceMemoryCard.cpp",
"HW/EXI_DeviceMic.cpp",
"HW/EXI_DeviceEthernet.cpp",
"HW/EXI_DeviceEthernet.cpp",
"HW/GPFifo.cpp",
"HW/HW.cpp",
"HW/Memmap.cpp",
"HW/MemoryInterface.cpp",
"HW/PeripheralInterface.cpp",
"HW/PixelEngine.cpp",
"HW/SerialInterface.cpp",
"HW/SI.cpp",
"HW/SI_Device.cpp",
"HW/SI_DeviceGBA.cpp",
# "HW/SI_DeviceGBA.cpp",
"HW/SI_DeviceGCController.cpp",
"HW/StreamADPCM.cpp",
"HW/SystemTimers.cpp",

View File

@ -4,6 +4,6 @@ extern EventHandler *eventHandler;
namespace InputCommon
{
void Init();
void Shutdown();
void Init();
void Shutdown();
}

View File

@ -94,7 +94,12 @@ bool registerKey(int nPad, int id, sf::Key::Code code, int mods) {
key.keyCode = code;
key.mods = mods;
if (!eventHandler->EventHandler::RegisterEventListener(ParseKeyEvent, key)) {
if (!eventHandler) {
PanicAlert("Can't get event handler");
return false;
}
if (!eventHandler->RegisterEventListener(ParseKeyEvent, key)) {
char codestr[100];
EventHandler::SFKeyToString(code, codestr);
PanicAlert("Failed to register %s, might be already in use", codestr);
@ -109,7 +114,7 @@ bool registerKey(int nPad, int id, sf::Key::Code code, int mods) {
oldKey.mods = mods;
// Might be not be registered yet
eventHandler->EventHandler::RemoveEventListener(oldKey);
eventHandler->RemoveEventListener(oldKey);
}
pad[nPad].keyForControl[id] = code;