diff --git a/OptiScaler/nvapi/fakenvapi/main.cpp b/OptiScaler/nvapi/fakenvapi/main.cpp index 0a60be7f..83e01192 100644 --- a/OptiScaler/nvapi/fakenvapi/main.cpp +++ b/OptiScaler/nvapi/fakenvapi/main.cpp @@ -5,7 +5,11 @@ #include #include #include "../include/nvapi_interface.h" +#if defined __MINGW64__ || defined __MINGW32__ #include "../include/d3d12.h" +#else +#include +#endif #include "../include/nvapi.h" #include "nvapi.h" @@ -33,7 +37,7 @@ namespace nvd { static std::unordered_map registry; - void* nvapi_QueryInterface(NvU32 id) { + __declspec(dllexport) void* __cdecl nvapi_QueryInterface(NvU32 id) { auto entry = registry.find(id); if (entry != registry.end()) return entry->second; diff --git a/OptiScaler/nvapi/fakenvapi/nvapi.h b/OptiScaler/nvapi/fakenvapi/nvapi.h index 8b2b65b0..dd5bffaf 100644 --- a/OptiScaler/nvapi/fakenvapi/nvapi.h +++ b/OptiScaler/nvapi/fakenvapi/nvapi.h @@ -4,7 +4,11 @@ #include #include +#if defined __MINGW64__ || defined __MINGW32__ #include "../include/d3d12.h" +#else +#include +#endif #include #include "util.h" diff --git a/OptiScaler/nvapi/fakenvapi/spoofInfo.h b/OptiScaler/nvapi/fakenvapi/spoofInfo.h index e7ab9d1d..821b7d69 100644 --- a/OptiScaler/nvapi/fakenvapi/spoofInfo.h +++ b/OptiScaler/nvapi/fakenvapi/spoofInfo.h @@ -3,14 +3,14 @@ namespace spoof { constexpr NvU32 driverVersion = 54629; - constexpr std::string buildBranch = "buildBranch"; + constexpr auto buildBranch = "buildBranch"; constexpr NvU32 isDCHDriver = 1; constexpr NvU32 isNVIDIAStudioPackage = 1; constexpr NvU32 isNVIDIARTXProductionBranchPackage = 1; constexpr NvU32 isNVIDIARTXNewFeatureBranchPackage = 1; - constexpr std::string buildBaseBranch = "buildBaseBranch"; + constexpr auto buildBaseBranch = "buildBaseBranch"; - const std::string fullGPUName = "NVIDIA GeForce RTX 4090"; + constexpr auto fullGPUName = "NVIDIA GeForce RTX 4090"; constexpr NV_GPU_ARCHITECTURE_ID arch = NV_GPU_ARCHITECTURE_AD100; constexpr NV_GPU_ARCH_IMPLEMENTATION_ID implementation = NV_GPU_ARCH_IMPLEMENTATION_AD102; constexpr NV_GPU_CHIP_REVISION revision = NV_GPU_CHIP_REV_UNKNOWN;