mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-05-05 01:01:17 +00:00
27 lines
627 B
C++
27 lines
627 B
C++
#include "pch.h"
|
|
#include "Config.h"
|
|
#include "CyberXess.h"
|
|
#include "Util.h"
|
|
|
|
FeatureContext* CyberXessContext::CreateContext()
|
|
{
|
|
auto handleId = rand();
|
|
Contexts[handleId] = std::make_unique<FeatureContext>();
|
|
Contexts[handleId]->Handle.Id = handleId;
|
|
return Contexts[handleId].get();
|
|
}
|
|
|
|
void CyberXessContext::DeleteContext(NVSDK_NGX_Handle* handle)
|
|
{
|
|
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");
|
|
}
|