mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Add option to block nvapi
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <unordered_map>
|
||||
#include "common/formatting.h"
|
||||
#include "core/core.h"
|
||||
#include "core/settings.h"
|
||||
#include "driver/d3d11/d3d11_hooks.h"
|
||||
#include "hooks/hooks.h"
|
||||
#include "nvapi_wrapper.h"
|
||||
@@ -34,6 +35,9 @@
|
||||
|
||||
#include "official/nvapi/nvapi.h"
|
||||
|
||||
RDOC_CONFIG(bool, NV_BlockNVAPI, false,
|
||||
"Completely block nvapi from activating, pretend no NV GPU is present");
|
||||
|
||||
namespace
|
||||
{
|
||||
#include "official/nvapi/nvapi_interface.h"
|
||||
@@ -503,6 +507,9 @@ private:
|
||||
|
||||
static NvAPI_Status __cdecl NvAPI_Initialize_hook()
|
||||
{
|
||||
if(NV_BlockNVAPI())
|
||||
return NVAPI_NVIDIA_DEVICE_NOT_FOUND;
|
||||
|
||||
NvAPI_Status ret = nvhooks.NvAPI_Initialize()();
|
||||
|
||||
if(ret == NVAPI_OK)
|
||||
|
||||
Reference in New Issue
Block a user