mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-12-29 12:16:08 +00:00
Remove the need for a patched nvidia library for NvFBC. (#2471)
This commit is contained in:
parent
17e0f1a816
commit
9afb1aea00
@ -614,6 +614,12 @@ namespace cuda {
|
||||
make() {
|
||||
NVFBC_CREATE_HANDLE_PARAMS params { NVFBC_CREATE_HANDLE_PARAMS_VER };
|
||||
|
||||
// Set privateData to allow NvFBC on consumer NVIDIA GPUs.
|
||||
// Based on https://github.com/keylase/nvidia-patch/blob/3193b4b1cea91527bf09ea9b8db5aade6a3f3c0a/win/nvfbcwrp/nvfbcwrp_main.cpp#L23-L25 .
|
||||
const unsigned int MAGIC_PRIVATE_DATA[4] = { 0xAEF57AC5, 0x401D1A39, 0x1B856BBE, 0x9ED0CEBA };
|
||||
params.privateData = MAGIC_PRIVATE_DATA;
|
||||
params.privateDataSize = sizeof(MAGIC_PRIVATE_DATA);
|
||||
|
||||
handle_t handle;
|
||||
auto status = func.nvFBCCreateHandle(&handle.handle, ¶ms);
|
||||
if (status) {
|
||||
|
Loading…
Reference in New Issue
Block a user