diff --git a/nvfbc/README.md b/nvfbc/README.md index ee728ef..fb464de 100644 --- a/nvfbc/README.md +++ b/nvfbc/README.md @@ -5,7 +5,7 @@ This library contains a safe FFI for [NVFBC](https://developer.nvidia.com/captur ## Supported GPUs As this uses a proprietary NVIDIA API, the supported devices are limited to NVIDIA GPUs. Additionally, the NVFBC API is only officially supported on GRID, Tesla, or Quadro X2000+ GPUs. -Unofficial support is possible by applying a [patch](https://github.com/illnyang/nvlax/) to the NVFBC library. +Unofficial support is provided for other GPUs. ## Supported capture types Currently only CUDA and system (RAM) capture types are supported. diff --git a/nvfbc/src/common.rs b/nvfbc/src/common.rs index cbdd94c..5e8b940 100644 --- a/nvfbc/src/common.rs +++ b/nvfbc/src/common.rs @@ -18,8 +18,13 @@ pub(crate) fn check_ret(handle: Handle, ret: nvfbc_sys::_NVFBCSTATUS) -> Result< } pub(crate) fn create_handle() -> Result { + const MAGIC_PRIVATE_DATA: [u32; 4] = [0xAEF57AC5, 0x401D1A39, 0x1B856BBE, 0x9ED0CEBA]; + let mut params: nvfbc_sys::_NVFBC_CREATE_HANDLE_PARAMS = unsafe { MaybeUninit::zeroed().assume_init() }; params.dwVersion = nvfbc_sys::NVFBC_CREATE_HANDLE_PARAMS_VER; + params.privateData = MAGIC_PRIVATE_DATA.as_ptr() as _; + params.privateDataSize = std::mem::size_of_val(&MAGIC_PRIVATE_DATA) as u32; + let mut handle = 0; let ret = unsafe { nvfbc_sys::NvFBCCreateHandle( &mut handle, diff --git a/nvfbc/src/lib.rs b/nvfbc/src/lib.rs index e334184..a0bf721 100644 --- a/nvfbc/src/lib.rs +++ b/nvfbc/src/lib.rs @@ -3,7 +3,7 @@ //! # Supported GPUs //! As this uses a proprietary NVIDIA API, the supported devices are limited to NVIDIA GPUs. //! Additionally, the NVFBC API is only officially supported on GRID, Tesla, or Quadro X2000+ GPUs. -//! Unofficial support is possible by applying a [patch](https://github.com/illnyang/nvlax/) to the NVFBC library. +//! Unofficial support is provided for other GPUs. //! //! # Supported capture types //! Currently only CUDA and system (RAM) capture types are supported.