From 7fdcaa15d8ed11617cd3e5308a74dcfa5bc2366e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 16 Jun 2004 20:48:53 +0000 Subject: [PATCH] simplify --- .../InputHandler_DirectInputHelper.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/stepmania/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp b/stepmania/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp index b50846f0af..586470bccc 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp @@ -1,8 +1,8 @@ #include "global.h" -#include "SDL_utils.h" #include "InputHandler_DirectInputHelper.h" #include "RageUtil.h" #include "RageLog.h" +#include "StepMania.h" #pragma comment(lib, "dinput.lib") #if defined(_WINDOWS) @@ -12,7 +12,6 @@ LPDIRECTINPUT dinput = NULL; static int ConvertScancodeToKey( int scancode ); static BOOL CALLBACK DIJoystick_EnumDevObjectsProc(LPCDIDEVICEOBJECTINSTANCE dev, LPVOID data); -static HWND GetHwnd(); DIDevice::DIDevice() { @@ -50,7 +49,7 @@ bool DIDevice::Open() if( type == KEYBOARD ) coop = DISCL_FOREGROUND|DISCL_NONEXCLUSIVE; - hr = IDirectInputDevice2_SetCooperativeLevel( Device, GetHwnd(), coop ); + hr = IDirectInputDevice2_SetCooperativeLevel( Device, g_hWndMain, coop ); if ( hr != DI_OK ) { LOG->Info( hr_ssprintf(hr, "OpenDevice(%s): IDirectInputDevice2_SetCooperativeLevel", JoystickInst.tszProductName) ); @@ -301,16 +300,6 @@ static int ConvertScancodeToKey( int scancode ) }; } -static HWND GetHwnd() -{ - SDL_SysWMinfo info; - SDL_VERSION(&info.version); - if( SDL_GetWMInfo(&info) < 0 ) - RageException::Throw( "SDL_GetWMInfo failed" ); - - return info.window; -} - /* * (c) 2003-2004 Glenn Maynard * All rights reserved.