forgot include

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1986 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2009-01-23 00:15:57 +00:00
parent cb9baf6d07
commit 8a87001778
4 changed files with 61 additions and 53 deletions

View File

@ -1,5 +1,10 @@
#ifndef INPUTMANAGER_H #ifndef INPUTMANAGER_H
#define INPUTMANAGER_H #define INPUTMANAGER_H
#include "Common.h"
#if defined HAVE_SDL && HAVE_SDL
#include <SDL.h>
#endif
class InputManager { class InputManager {

View File

@ -257,9 +257,11 @@ void CPluginManager::OpenConfig(void* _Parent, const char *_rFilename)
{ {
Common::CPlugin *plugin = new Common::CPlugin(_rFilename); Common::CPlugin *plugin = new Common::CPlugin(_rFilename);
m_InputManager->Init();
plugin->SetGlobals(m_PluginGlobals); plugin->SetGlobals(m_PluginGlobals);
plugin->Config((HWND)_Parent); plugin->Config((HWND)_Parent);
delete plugin; delete plugin;
m_InputManager->Shutdown();
} }
// ---------------------------------------- // ----------------------------------------

View File

@ -258,12 +258,9 @@ int Search_Devices()
if (joyinfo) if (joyinfo)
{ {
delete [] joyinfo; delete [] joyinfo;
joyinfo = new CONTROLLER_INFO [numjoy];
} }
else
{
joyinfo = new CONTROLLER_INFO [numjoy]; joyinfo = new CONTROLLER_INFO [numjoy];
}
// Warn the user if no PadMapping are detected // Warn the user if no PadMapping are detected
if (numjoy == 0) if (numjoy == 0)
@ -323,22 +320,24 @@ void Shutdown()
if (PadMapping[3].enabled && SDL_JoystickOpened(PadMapping[3].ID)) if (PadMapping[3].enabled && SDL_JoystickOpened(PadMapping[3].ID))
SDL_JoystickClose(joystate[3].joy); SDL_JoystickClose(joystate[3].joy);
#ifdef _DEBUG #ifdef _DEBUG
DEBUG_QUIT(); DEBUG_QUIT();
#endif #endif
if(joyinfo) {
delete [] joyinfo; delete [] joyinfo;
joyinfo = NULL; joyinfo = NULL;
}
emulator_running = false; emulator_running = false;
#ifdef _WIN32 #ifdef _WIN32
#ifdef USE_RUMBLE_DINPUT_HACK #ifdef USE_RUMBLE_DINPUT_HACK
FreeDirectInput(); FreeDirectInput();
#endif #endif
#elif defined(__linux__) #elif defined(__linux__)
close(fd); close(fd);
#endif #endif
} }

View File

@ -227,21 +227,23 @@ void Shutdown()
if(joysticks[3].enabled) if(joysticks[3].enabled)
SDL_JoystickClose(joystate[3].joy); SDL_JoystickClose(joystate[3].joy);
#ifdef _DEBUG #ifdef _DEBUG
DEBUG_QUIT(); DEBUG_QUIT();
#endif #endif
if (joyinfo) {
delete [] joyinfo; delete [] joyinfo;
joyinfo = NULL;
}
emulator_running = FALSE; emulator_running = FALSE;
#ifdef _WIN32 #ifdef _WIN32
#ifdef USE_RUMBLE_DINPUT_HACK #ifdef USE_RUMBLE_DINPUT_HACK
FreeDirectInput(); FreeDirectInput();
#endif #endif
#elif defined(__linux__) #elif defined(__linux__)
close(fd); close(fd);
#endif #endif
} }
void DoState(unsigned char **ptr, int mode) { void DoState(unsigned char **ptr, int mode) {