diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2011-07-29 10:32:30 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2011-07-29 10:32:30 +0400 |
commit | b46d8955509e805f06b76a6fd800ecb4edee113b (patch) | |
tree | 7ed0b1a3b5d04ab48d3e9062ff02ce54961ecb06 /intern/ghost/intern/GHOST_WindowWin32.cpp | |
parent | 6960127d2609620d52620539388ada5cb466bab2 (diff) | |
parent | 26589497529ca3c8da85391d4976d286a371e258 (diff) |
Merging r36529-38806bge_components
Diffstat (limited to 'intern/ghost/intern/GHOST_WindowWin32.cpp')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index a89b2608bb4..1ba51376ff9 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -136,7 +136,7 @@ GHOST_WindowWin32::GHOST_WindowWin32( GHOST_TSuccess msEnabled, int msPixelFormat) : - GHOST_Window(title, left, top, width, height, state, GHOST_kDrawingContextTypeNone, + GHOST_Window(width, height, state, GHOST_kDrawingContextTypeNone, stereoVisual,numOfAASamples), m_system(system), m_hDC(0), @@ -307,6 +307,15 @@ GHOST_WindowWin32::GHOST_WindowWin32( } } + if (parentwindowhwnd != 0) { + RAWINPUTDEVICE device = {0}; + device.usUsagePage = 0x01; /* usUsagePage & usUsage for keyboard*/ + device.usUsage = 0x06; /* http://msdn.microsoft.com/en-us/windows/hardware/gg487473.aspx */ + device.dwFlags |= RIDEV_INPUTSINK; // makes WM_INPUT is visible for ghost when has parent window + device.hwndTarget = m_hWnd; + RegisterRawInputDevices(&device, 1, sizeof(device)); + } + m_wintab = ::LoadLibrary("Wintab32.dll"); if (m_wintab) { GHOST_WIN32_WTInfo fpWTInfo = ( GHOST_WIN32_WTInfo ) ::GetProcAddress( m_wintab, "WTInfoA" ); |