Files
OptiScaler/CyberXeSS/CyberXess.cpp
T
Cetin Ozdil 38087b1ae7 added cas support and refactored code a lot
now its following dlss feature concept more closely
2024-01-06 14:59:23 +03:00

30 lines
688 B
C++

#include "pch.h"
#include "Config.h"
#include "CyberXess.h"
#include "Util.h"
FeatureContext* CyberXessContext::CreateContext()
{
auto handleId = handleCounter++;
Contexts[handleId] = std::make_unique<FeatureContext>();
Contexts[handleId]->Handle.Id = handleId;
return Contexts[handleId].get();
}
void CyberXessContext::DeleteContext(NVSDK_NGX_Handle* handle)
{
if (handle == nullptr || handle == NULL)
return;
auto handleId = handle->Id;
auto it = std::find_if(Contexts.begin(), Contexts.end(), [&handleId](const auto& p) { return p.first == handleId; });
Contexts.erase(it);
}
CyberXessContext::CyberXessContext()
{
MyConfig = std::make_unique<Config>(L"nvngx.ini");
}