Skip to content

Commit

Permalink
Fixed|Windows: Input subsystem is dependent on the main window
Browse files Browse the repository at this point in the history
The main window (and therefore the window system) must exist before the
input subsystem is initialized, because DirectInput requires a window
handle.
  • Loading branch information
skyjake committed Apr 22, 2013
1 parent 5f8e8e2 commit 3dc9683
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
10 changes: 5 additions & 5 deletions doomsday/client/src/clientapp.cpp
Expand Up @@ -160,11 +160,6 @@ void ClientApp::initialize()
}
#endif

// Create the input system.
d->inputSys = new InputSystem;
addSystem(*d->inputSys);
d->widgetActions.reset(new WidgetActions);

// Create the window system.
d->winSys = new WindowSystem;
addSystem(*d->winSys);
Expand All @@ -176,6 +171,11 @@ void ClientApp::initialize()
DD_ComposeMainWindowTitle(title);
d->winSys->createWindow()->setWindowTitle(title);

// Create the input system.
d->inputSys = new InputSystem;
addSystem(*d->inputSys);
d->widgetActions.reset(new WidgetActions);

App_Timer(1, continueInitWithEventLoopRunning);
}

Expand Down
5 changes: 0 additions & 5 deletions doomsday/client/src/windows/mouse_win32.cpp
Expand Up @@ -38,11 +38,6 @@ static int Mouse_Win32_Init()

// We'll need a window handle for this.
HWND hWnd = (HWND) ClientWindow::main().nativeHandle();
if(!hWnd)
{
Con_Error("Mouse_Init: Main window not available, cannot init mouse.");
return false;
}

HRESULT hr = -1;
// Prefer the newer version 8 interface if available.
Expand Down

0 comments on commit 3dc9683

Please sign in to comment.