diff options
Diffstat (limited to 'runtime/shims/dxgi_com.cpp')
| -rw-r--r-- | runtime/shims/dxgi_com.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/runtime/shims/dxgi_com.cpp b/runtime/shims/dxgi_com.cpp index 734824e07..07abe5f76 100644 --- a/runtime/shims/dxgi_com.cpp +++ b/runtime/shims/dxgi_com.cpp | |||
| @@ -925,8 +925,19 @@ public: | |||
| 925 | return CreateSwapChainForHwnd(device, hwnd, desc, nullptr, restrict_to_output, out); | 925 | return CreateSwapChainForHwnd(device, hwnd, desc, nullptr, restrict_to_output, out); |
| 926 | } | 926 | } |
| 927 | HRESULT STDMETHODCALLTYPE GetSharedResourceAdapterLuid(HANDLE, LUID*) override { return E_NOTIMPL; } | 927 | HRESULT STDMETHODCALLTYPE GetSharedResourceAdapterLuid(HANDLE, LUID*) override { return E_NOTIMPL; } |
| 928 | HRESULT STDMETHODCALLTYPE RegisterStereoStatusWindow(HWND, UINT, DWORD*) override { return E_NOTIMPL; } | 928 | // Microsoft documents S_OK with a cookie for UnregisterStereoStatus (E_NOTIMPL is only the answer of the |
| 929 | HRESULT STDMETHODCALLTYPE RegisterStereoStatusEvent(HANDLE, DWORD*) override { return E_NOTIMPL; } | 929 | // Windows 7 Platform Update). Stereo is never enabled here, so the window or event is never notified. |
| 930 | HRESULT STDMETHODCALLTYPE RegisterStereoStatusWindow(HWND hwnd, UINT msg, DWORD* cookie) override { | ||
| 931 | (void)msg; | ||
| 932 | if (!hwnd || !cookie) return DXGI_ERROR_INVALID_CALL; | ||
| 933 | *cookie = next_stereo_cookie_.fetch_add(1, std::memory_order_relaxed); | ||
| 934 | return S_OK; | ||
| 935 | } | ||
| 936 | HRESULT STDMETHODCALLTYPE RegisterStereoStatusEvent(HANDLE event, DWORD* cookie) override { | ||
| 937 | if (!event || !cookie) return DXGI_ERROR_INVALID_CALL; | ||
| 938 | *cookie = next_stereo_cookie_.fetch_add(1, std::memory_order_relaxed); | ||
| 939 | return S_OK; | ||
| 940 | } | ||
| 930 | void STDMETHODCALLTYPE UnregisterStereoStatus(DWORD) override {} | 941 | void STDMETHODCALLTYPE UnregisterStereoStatus(DWORD) override {} |
| 931 | HRESULT STDMETHODCALLTYPE RegisterOcclusionStatusWindow(HWND hwnd, UINT msg, DWORD* cookie) override { | 942 | HRESULT STDMETHODCALLTYPE RegisterOcclusionStatusWindow(HWND hwnd, UINT msg, DWORD* cookie) override { |
| 932 | (void)msg; | 943 | (void)msg; |
| @@ -1061,6 +1072,7 @@ private: | |||
| 1061 | std::mutex adapters_changed_mutex_; | 1072 | std::mutex adapters_changed_mutex_; |
| 1062 | std::map<DWORD, HANDLE> adapters_changed_events_; | 1073 | std::map<DWORD, HANDLE> adapters_changed_events_; |
| 1063 | DWORD next_adapters_changed_cookie_ = 1; | 1074 | DWORD next_adapters_changed_cookie_ = 1; |
| 1075 | std::atomic<DWORD> next_stereo_cookie_{1}; | ||
| 1064 | }; | 1076 | }; |
| 1065 | 1077 | ||
| 1066 | } // namespace | 1078 | } // namespace |