-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <Utils/NvidiaUtil.h> | ||
#include <d3d11.h> | ||
|
||
bool IsNvidiaOverlayLoaded() | ||
{ | ||
return GetModuleHandleW(L"nvspcap64.dll"); | ||
} | ||
|
||
// This makes the Nvidia overlay happy. | ||
// The call to D3D11CreateDeviceAndSwapChain probably causes some of their | ||
// internal hooks to be called and do the required init work before the game window opens. | ||
HRESULT CreateEarlyDxSwapChain() | ||
{ | ||
ID3D11Device* device; | ||
return D3D11CreateDeviceAndSwapChain(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, 0, nullptr, 0, D3D11_SDK_VERSION, | ||
nullptr, nullptr, &device, nullptr, nullptr); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#include <Windows.h> | ||
|
||
bool IsNvidiaOverlayLoaded(); | ||
|
||
HRESULT CreateEarlyDxSwapChain(); |