From b5d91ccc21502bbc909d7983ffd23ced304c41ba Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sat, 11 Jan 2020 22:28:52 +1100 Subject: [PATCH] [c-host] nvfbc: fixed invalid nvfbc init --- .../platform/Windows/capture/NVFBC/src/nvfbc.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/c-host/platform/Windows/capture/NVFBC/src/nvfbc.c b/c-host/platform/Windows/capture/NVFBC/src/nvfbc.c index 9bf2e963..2d057b51 100644 --- a/c-host/platform/Windows/capture/NVFBC/src/nvfbc.c +++ b/c-host/platform/Windows/capture/NVFBC/src/nvfbc.c @@ -104,7 +104,9 @@ static void nvfbc_initOptions() option_register(options); } -static bool nvfbc_create() +static bool nvfbc_create( + CaptureGetPointerBuffer getPointerBufferFn, + CapturePostPointerBuffer postPointerBufferFn) { if (!NvFBCInit()) return false; @@ -147,23 +149,19 @@ static bool nvfbc_create() return false; } - this->seperateCursor = option_get_bool("nvfbc", "decoupleCursor"); + this->seperateCursor = option_get_bool("nvfbc", "decoupleCursor"); + this->getPointerBufferFn = getPointerBufferFn; + this->postPointerBufferFn = postPointerBufferFn; return true; } -static bool nvfbc_init( - CaptureGetPointerBuffer getPointerBufferFn, - CapturePostPointerBuffer postPointerBufferFn) +static bool nvfbc_init() { - this->stop = false; - this->getPointerBufferFn = getPointerBufferFn; - this->postPointerBufferFn = postPointerBufferFn; - + this->stop = false; getDesktopSize(&this->width, &this->height); lgResetEvent(this->frameEvent); - HANDLE event; if (!NvFBCToSysSetup( this->nvfbc,