Initialised all controller interfaces together on CFrame construction to fix the crash that would occur if the controller config were opened before a game was started.

This commit is contained in:
skidau
2015-02-04 18:05:22 +11:00
parent 5e645732f2
commit b9fb6ad3e8
6 changed files with 35 additions and 14 deletions

View File

@ -48,7 +48,7 @@ const std::string hotkey_labels[] =
_trans("Change Disc"),
_trans("Refresh List"),
_trans("Play/Pause"),
_trans("Toggle Pause"),
_trans("Stop"),
_trans("Reset"),
_trans("Frame Advance"),
@ -205,7 +205,8 @@ bool IsPressed(int Id, bool held)
void Initialize(void* const hwnd)
{
s_config.controllers.push_back(new HotkeyManager());
if (s_config.controllers.empty())
s_config.controllers.push_back(new HotkeyManager());
g_controller_interface.Initialize(hwnd);