VirtualBox

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

最後變更 在這個檔案是 105107,由 vboxsync 提交於 9 月 前

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

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 613 位元組
 
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}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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