use GraphicsWindow::GetHwnd
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
#include "archutils/Win32/AppInstance.h"
|
||||
#include "archutils/Win32/GraphicsWindow.h"
|
||||
#include "InputFilter.h"
|
||||
#include "PrefsManager.h"
|
||||
|
||||
@@ -350,7 +351,7 @@ void InputHandler_DInput::UpdateBuffered(DIDevice &device, const RageTimer &tm)
|
||||
|
||||
/* XXX: We should check GetConsoleWindow(), to allow input while the console window
|
||||
* is focused. */
|
||||
if( GetForegroundWindow() != g_hWndMain )
|
||||
if( GetForegroundWindow() != GraphicsWindow::GetHwnd() )
|
||||
return;
|
||||
|
||||
for(int i = 0; i < (int) numevents; ++i)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
#include "StepMania.h"
|
||||
#include "archutils/Win32/GraphicsWindow.h"
|
||||
|
||||
#pragma comment(lib, "dinput.lib")
|
||||
#if defined(_WINDOWS)
|
||||
@@ -47,7 +48,7 @@ bool DIDevice::Open()
|
||||
if( type == KEYBOARD )
|
||||
coop = DISCL_FOREGROUND|DISCL_NONEXCLUSIVE;
|
||||
|
||||
hr = Device->SetCooperativeLevel( g_hWndMain, coop );
|
||||
hr = Device->SetCooperativeLevel( GraphicsWindow::GetHwnd(), coop );
|
||||
if ( hr != DI_OK )
|
||||
{
|
||||
LOG->Info( hr_ssprintf(hr, "OpenDevice(%s): IDirectInputDevice2::SetCooperativeLevel", JoystickInst.tszProductName) );
|
||||
|
||||
Reference in New Issue
Block a user