summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2010-10-12 19:42:29 +0000
committerJordan Woyak <jordan.woyak@gmail.com>2010-10-12 19:42:29 +0000
commit7e08fc19fc58413bf432f6b9e0e29deb4213d0e6 (patch)
treea9739c7227316367137b3bc506eac34bdcef9b98 /Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
parentde3ad372998f3c0c7fb4fb47fde8d3b2edd79759 (diff)
Moved WiimoteNew into Dolphin and eliminated the old wiimote plugin. Removed wiimote plugin support. Moved input dialog related InputUICommon stuff into DolphinWX. Removed now unused InputCommon files. UDPWiimote stuff is temporarily disabled until it is reorganized so Core won't depend on wx. Real wiimotes are now initialized on first need(wiimote diag open or game start) and left initialized until Dolphin exit.(maybe this will work better for Linux/OS X) (scons probably needs some fixes)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6270 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp')
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
index 235985704a..e29c9d53e3 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
+++ b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
@@ -20,14 +20,16 @@
#define INPUT_DETECT_THRESHOLD 0.85
+ControllerInterface g_controller_interface;
+
//
// Init
//
// detect devices and inputs outputs / will make refresh function later
//
-void ControllerInterface::Init()
+void ControllerInterface::Initialize()
{
- if ( m_is_init )
+ if (m_is_init)
return;
#ifdef CIFACE_USE_DINPUT
@@ -54,9 +56,9 @@ void ControllerInterface::Init()
//
// remove all devices/ call library cleanup functions
//
-void ControllerInterface::DeInit(const bool hacks_no_sdl_quit)
+void ControllerInterface::Shutdown()
{
- if ( false == m_is_init )
+ if (false == m_is_init)
return;
std::vector<Device*>::const_iterator
@@ -73,12 +75,6 @@ void ControllerInterface::DeInit(const bool hacks_no_sdl_quit)
// update output
(*d)->UpdateOutput();
- // TODO: remove this
- // major hacks/memleaks to prevent gcpad/wiimote new from crashing eachother
- if (hacks_no_sdl_quit)
- if ((*d)->GetSource() == "SDL")
- continue;
-
//delete device
delete *d;
}
@@ -99,8 +95,7 @@ void ControllerInterface::DeInit(const bool hacks_no_sdl_quit)
#endif
#ifdef CIFACE_USE_SDL
// TODO: there seems to be some sort of memory leak with SDL, quit isn't freeing everything up
- if (false == hacks_no_sdl_quit)
- SDL_Quit();
+ SDL_Quit();
#endif
m_is_init = false;