ControllerInterface: Get rid of SetHwnd(), introduce Reinitialize()
Initialize now just takes the handle directly. Reinitialize is added because it is much more straightforward in comparison to doing the Shutdown-Initialize manually.
This commit is contained in:
1 parent
8912315596
commit
b7b2074cc2
5 files changed
+21
-24
No files matched your search
@@ -40,8 +40,7 @@ void Initialize(void* const hwnd)
|
||||
for (unsigned int i=0; i<4; ++i)
|
||||
s_config.controllers.push_back(new GCPad(i));
|
||||
|
||||
g_controller_interface.SetHwnd(hwnd);
|
||||
g_controller_interface.Initialize();
|
||||
g_controller_interface.Initialize(hwnd);
|
||||
|
||||
// load the saved controller config
|
||||
s_config.LoadConfig(true);
|
||||
|
||||
@@ -44,9 +44,7 @@ void Initialize(void* const hwnd, bool wait)
|
||||
for (unsigned int i = WIIMOTE_CHAN_0; i<MAX_BBMOTES; ++i)
|
||||
s_config.controllers.push_back(new WiimoteEmu::Wiimote(i));
|
||||
|
||||
|
||||
g_controller_interface.SetHwnd(hwnd);
|
||||
g_controller_interface.Initialize();
|
||||
g_controller_interface.Initialize(hwnd);
|
||||
|
||||
s_config.LoadConfig(false);
|
||||
|
||||
|
||||
Reference in new issue
Block a user