iidx: option to disable recording function (#445)

## Link to GitHub Issue, if one exists
#442 

## Description of change
Adds a new option that intentionally fails the recording functionality.

## Testing
Tested on iidx32.
This commit is contained in:
bicarus-dev
2025-12-11 22:03:51 -08:00
committed by GitHub
parent 6856a0950c
commit c3428236f8
5 changed files with 26 additions and 1 deletions
@@ -27,6 +27,8 @@ static BOOL new_preset_guids = false;
namespace nvenc_hook {
bool FORCE_DISABLE;
std::optional<std::string> VIDEO_CQP_STRING_OVERRIDE;
std::optional<NV_ENC_QP> VIDEO_CQP_OVERRIDE;
@@ -189,6 +191,11 @@ namespace nvenc_hook {
}
NVENCSTATUS NVENCAPI NvEncodeAPICreateInstance_hook(NV_ENCODE_API_FUNCTION_LIST *pFunctionList) {
if (FORCE_DISABLE) {
return NV_ENC_ERR_NO_ENCODE_DEVICE;
}
// log_misc("nvenc_hook", "NvEncodeAPICreateInstance hook hit");
auto status = NvEncodeAPICreateInstance_orig(pFunctionList);
+5
View File
@@ -1,7 +1,12 @@
#pragma once
#ifdef SPICE64
namespace nvenc_hook {
extern bool FORCE_DISABLE;
extern std::optional<std::string> VIDEO_CQP_STRING_OVERRIDE;
void initialize();
}
#endif