mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-05 18:24:08 +00:00
[host] converted program to a windows hidden/background user app.
NvFBC will not start when running as a service, likely intentional security of the API to prevent it from being abused.
This commit is contained in:
@@ -55,13 +55,25 @@ namespace Capture
|
||||
status.dwVersion = NVFBC_STATUS_VER;
|
||||
status.dwAdapterIdx = 0;
|
||||
|
||||
if (m_fnGetStatusEx(&status) != NVFBC_SUCCESS)
|
||||
NVFBCRESULT ret = m_fnGetStatusEx(&status);
|
||||
if (ret != NVFBC_SUCCESS)
|
||||
{
|
||||
DEBUG_ERROR("Failed to get NvFBC status");
|
||||
DeInitialize();
|
||||
return false;
|
||||
DEBUG_INFO("Attempting to enable NvFBC");
|
||||
if (m_fnEnable(NVFBC_STATE_ENABLE) == NVFBC_SUCCESS)
|
||||
{
|
||||
DEBUG_INFO("Success, attempting to get status again");
|
||||
ret = m_fnGetStatusEx(&status);
|
||||
}
|
||||
|
||||
if (ret != NVFBC_SUCCESS)
|
||||
{
|
||||
DEBUG_ERROR("Failed to get NvFBC status");
|
||||
DeInitialize();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!status.bIsCapturePossible)
|
||||
{
|
||||
DEBUG_ERROR("Capture is not possible, unsupported device or driver");
|
||||
|
Reference in New Issue
Block a user