mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-05 00:00:42 -07:00
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:
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user