forgot include
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1986 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
cb9baf6d07
commit
8a87001778
|
@ -1,5 +1,10 @@
|
|||
#ifndef INPUTMANAGER_H
|
||||
#define INPUTMANAGER_H
|
||||
#include "Common.h"
|
||||
|
||||
#if defined HAVE_SDL && HAVE_SDL
|
||||
#include <SDL.h>
|
||||
#endif
|
||||
|
||||
class InputManager {
|
||||
|
||||
|
|
|
@ -257,9 +257,11 @@ void CPluginManager::OpenConfig(void* _Parent, const char *_rFilename)
|
|||
{
|
||||
|
||||
Common::CPlugin *plugin = new Common::CPlugin(_rFilename);
|
||||
m_InputManager->Init();
|
||||
plugin->SetGlobals(m_PluginGlobals);
|
||||
plugin->Config((HWND)_Parent);
|
||||
delete plugin;
|
||||
m_InputManager->Shutdown();
|
||||
}
|
||||
|
||||
// ----------------------------------------
|
||||
|
|
|
@ -258,13 +258,10 @@ int Search_Devices()
|
|||
if (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
|
||||
if (numjoy == 0)
|
||||
{
|
||||
|
@ -312,33 +309,35 @@ int Search_Devices()
|
|||
Called from: The Dolphin Core, ConfigBox::OnClose() */
|
||||
void Shutdown()
|
||||
{
|
||||
//Console::Print("Shutdown: %i\n", SDL_WasInit(0));
|
||||
|
||||
if (PadMapping[0].enabled && SDL_JoystickOpened(PadMapping[0].ID))
|
||||
SDL_JoystickClose(joystate[0].joy);
|
||||
if (PadMapping[1].enabled && SDL_JoystickOpened(PadMapping[1].ID))
|
||||
SDL_JoystickClose(joystate[1].joy);
|
||||
if (PadMapping[2].enabled && SDL_JoystickOpened(PadMapping[2].ID))
|
||||
SDL_JoystickClose(joystate[2].joy);
|
||||
if (PadMapping[3].enabled && SDL_JoystickOpened(PadMapping[3].ID))
|
||||
SDL_JoystickClose(joystate[3].joy);
|
||||
|
||||
#ifdef _DEBUG
|
||||
DEBUG_QUIT();
|
||||
#endif
|
||||
|
||||
//Console::Print("Shutdown: %i\n", SDL_WasInit(0));
|
||||
|
||||
if (PadMapping[0].enabled && SDL_JoystickOpened(PadMapping[0].ID))
|
||||
SDL_JoystickClose(joystate[0].joy);
|
||||
if (PadMapping[1].enabled && SDL_JoystickOpened(PadMapping[1].ID))
|
||||
SDL_JoystickClose(joystate[1].joy);
|
||||
if (PadMapping[2].enabled && SDL_JoystickOpened(PadMapping[2].ID))
|
||||
SDL_JoystickClose(joystate[2].joy);
|
||||
if (PadMapping[3].enabled && SDL_JoystickOpened(PadMapping[3].ID))
|
||||
SDL_JoystickClose(joystate[3].joy);
|
||||
|
||||
#ifdef _DEBUG
|
||||
DEBUG_QUIT();
|
||||
#endif
|
||||
|
||||
if(joyinfo) {
|
||||
delete [] joyinfo;
|
||||
joyinfo = NULL;
|
||||
|
||||
emulator_running = false;
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef USE_RUMBLE_DINPUT_HACK
|
||||
FreeDirectInput();
|
||||
#endif
|
||||
#elif defined(__linux__)
|
||||
close(fd);
|
||||
#endif
|
||||
}
|
||||
|
||||
emulator_running = false;
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef USE_RUMBLE_DINPUT_HACK
|
||||
FreeDirectInput();
|
||||
#endif
|
||||
#elif defined(__linux__)
|
||||
close(fd);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -218,30 +218,32 @@ void Initialize(void *init)
|
|||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
void Shutdown()
|
||||
{
|
||||
if(joysticks[0].enabled)
|
||||
SDL_JoystickClose(joystate[0].joy);
|
||||
if(joysticks[1].enabled)
|
||||
SDL_JoystickClose(joystate[1].joy);
|
||||
if(joysticks[2].enabled)
|
||||
SDL_JoystickClose(joystate[2].joy);
|
||||
if(joysticks[3].enabled)
|
||||
SDL_JoystickClose(joystate[3].joy);
|
||||
|
||||
#ifdef _DEBUG
|
||||
DEBUG_QUIT();
|
||||
#endif
|
||||
|
||||
if(joysticks[0].enabled)
|
||||
SDL_JoystickClose(joystate[0].joy);
|
||||
if(joysticks[1].enabled)
|
||||
SDL_JoystickClose(joystate[1].joy);
|
||||
if(joysticks[2].enabled)
|
||||
SDL_JoystickClose(joystate[2].joy);
|
||||
if(joysticks[3].enabled)
|
||||
SDL_JoystickClose(joystate[3].joy);
|
||||
|
||||
#ifdef _DEBUG
|
||||
DEBUG_QUIT();
|
||||
#endif
|
||||
|
||||
if (joyinfo) {
|
||||
delete [] joyinfo;
|
||||
|
||||
emulator_running = FALSE;
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef USE_RUMBLE_DINPUT_HACK
|
||||
FreeDirectInput();
|
||||
#endif
|
||||
#elif defined(__linux__)
|
||||
close(fd);
|
||||
#endif
|
||||
joyinfo = NULL;
|
||||
}
|
||||
emulator_running = FALSE;
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef USE_RUMBLE_DINPUT_HACK
|
||||
FreeDirectInput();
|
||||
#endif
|
||||
#elif defined(__linux__)
|
||||
close(fd);
|
||||
#endif
|
||||
}
|
||||
|
||||
void DoState(unsigned char **ptr, int mode) {
|
||||
|
|
Loading…
Reference in New Issue