VirtualBox

source: vbox/trunk/src/libs/dxvk-2.3.1/include/native/wsi/native_sdl2.h@ 107879

Last change on this file since 107879 was 105107, checked in by vboxsync, 11 months ago

libs/dxvk-2.3.1: Make it build, bugref:10716

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 613 bytes
Line 
1#include <windows.h>
2
3#include <SDL2/SDL.h>
4
5namespace dxvk::wsi {
6
7 inline SDL_Window* fromHwnd(HWND hWindow) {
8 return reinterpret_cast<SDL_Window*>(hWindow);
9 }
10
11 inline HWND toHwnd(SDL_Window* pWindow) {
12 return reinterpret_cast<HWND>(pWindow);
13 }
14
15 // Offset so null HMONITORs go to -1
16 inline int32_t fromHmonitor(HMONITOR hMonitor) {
17 return static_cast<int32_t>(reinterpret_cast<intptr_t>(hMonitor)) - 1;
18 }
19
20 // Offset so -1 display id goes to 0 == NULL
21 inline HMONITOR toHmonitor(int32_t displayId) {
22 return reinterpret_cast<HMONITOR>(static_cast<intptr_t>(displayId + 1));
23 }
24
25}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette