///////////////////////////////////////////////////////
| 139 | { |
| 140 | //////////////////////////////////////////////////////////// |
| 141 | WindowImplWin32::WindowImplWin32(WindowHandle handle) : m_handle(handle) |
| 142 | { |
| 143 | // Set that this process is DPI aware and can handle DPI scaling |
| 144 | setProcessDpiAware(); |
| 145 | |
| 146 | if (m_handle) |
| 147 | { |
| 148 | // If we're the first window handle, we only need to poll for joysticks when WM_DEVICECHANGE message is received |
| 149 | if (handleCount == 0) |
| 150 | { |
| 151 | JoystickImpl::setLazyUpdates(true); |
| 152 | |
| 153 | initRawMouse(); |
| 154 | } |
| 155 | |
| 156 | ++handleCount; |
| 157 | |
| 158 | // We change the event procedure of the control (it is important to save the old one) |
| 159 | SetWindowLongPtrW(m_handle, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this)); |
| 160 | m_callback = SetWindowLongPtrW(m_handle, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(&WindowImplWin32::globalOnEvent)); |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | |
| 165 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected