mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-11-23 06:07:58 +00:00
made immadiate capture default disabled and ini option
refactored menu a bit
This commit is contained in:
1 parent
7d614b5782
commit
83d144b7e6
6 files changed
+30
-14
No files matched your search
@@ -76,6 +76,9 @@ bool Config::Reload(std::filesystem::path iniPath)
|
||||
if (!FGHUDFixExtended.has_value())
|
||||
FGHUDFixExtended = readBool("FrameGen", "HUDFixExtended");
|
||||
|
||||
if (!FGImmediateCapture.has_value())
|
||||
FGImmediateCapture = readBool("FrameGen", "HUDFixImmadiate");
|
||||
|
||||
if (!FGRectLeft.has_value())
|
||||
FGRectLeft = readInt("FrameGen", "RectLeft");
|
||||
|
||||
@@ -704,6 +707,7 @@ bool Config::SaveIni()
|
||||
ini.SetValue("FrameGen", "HUDFix", GetBoolValue(Instance()->FGHUDFix).c_str());
|
||||
ini.SetValue("FrameGen", "HUDLimit", GetIntValue(Instance()->FGHUDLimit).c_str());
|
||||
ini.SetValue("FrameGen", "HUDFixExtended", GetBoolValue(Instance()->FGHUDFixExtended).c_str());
|
||||
ini.SetValue("FrameGen", "HUDFixImmadiate", GetBoolValue(Instance()->FGImmediateCapture).c_str());
|
||||
ini.SetValue("FrameGen", "RectLeft", GetIntValue(Instance()->FGRectLeft).c_str());
|
||||
ini.SetValue("FrameGen", "RectTop", GetIntValue(Instance()->FGRectTop).c_str());
|
||||
ini.SetValue("FrameGen", "RectWidth", GetIntValue(Instance()->FGRectWidth).c_str());
|
||||
|
||||
+1
-1
@@ -167,6 +167,7 @@ public:
|
||||
std::optional<bool> FGAsync;
|
||||
std::optional<bool> FGHUDFix;
|
||||
std::optional<bool> FGHUDFixExtended;
|
||||
std::optional<bool> FGImmediateCapture;
|
||||
std::optional<int> FGHUDLimit;
|
||||
std::optional<int> FGRectLeft;
|
||||
std::optional<int> FGRectTop;
|
||||
@@ -177,7 +178,6 @@ public:
|
||||
bool SCChanged = false;
|
||||
bool SkipHeapCapture = false;
|
||||
bool UseThreadingForHeaps = false;
|
||||
bool FGImmediateCapture = true;
|
||||
|
||||
bool FGCaptureResources = false;
|
||||
int FGCapturedResourceCount = false;
|
||||
|
||||
@@ -1324,7 +1324,7 @@ static void hkSetGraphicsRootDescriptorTable(ID3D12GraphicsCommandList* This, UI
|
||||
|
||||
do
|
||||
{
|
||||
if (Config::Instance()->FGImmediateCapture && CheckCapture(__FUNCTION__))
|
||||
if (Config::Instance()->FGImmediateCapture.value_or(false) && CheckCapture(__FUNCTION__))
|
||||
{
|
||||
CaptureHudless(This, capturedBuffer, capturedBuffer->state);
|
||||
break;
|
||||
@@ -1412,7 +1412,7 @@ static void hkOMSetRenderTargets(ID3D12GraphicsCommandList* This, UINT NumRender
|
||||
LOG_DEBUG_ONLY("CommandList: {:X}", (size_t)This);
|
||||
resource->state = D3D12_RESOURCE_STATE_RENDER_TARGET;
|
||||
|
||||
if (Config::Instance()->FGImmediateCapture && CheckCapture(__FUNCTION__))
|
||||
if (Config::Instance()->FGImmediateCapture.value_or(false) && CheckCapture(__FUNCTION__))
|
||||
{
|
||||
CaptureHudless(This, resource, resource->state);
|
||||
break;
|
||||
@@ -1491,7 +1491,7 @@ static void hkSetComputeRootDescriptorTable(ID3D12GraphicsCommandList* This, UIN
|
||||
|
||||
do
|
||||
{
|
||||
if (Config::Instance()->FGImmediateCapture && CheckForHudless(__FUNCTION__, capturedBuffer) && CheckCapture(__FUNCTION__))
|
||||
if (Config::Instance()->FGImmediateCapture.value_or(false) && CheckForHudless(__FUNCTION__, capturedBuffer) && CheckCapture(__FUNCTION__))
|
||||
{
|
||||
CaptureHudless(This, capturedBuffer, capturedBuffer->state);
|
||||
break;
|
||||
|
||||
@@ -917,22 +917,24 @@ void ImGuiCommon::RenderMenu()
|
||||
}
|
||||
ShowHelpMarker("Delay HUDless capture, high values might cause crash!");
|
||||
|
||||
ImGui::SameLine(0.0f, 16.0f);
|
||||
auto immediate = Config::Instance()->FGImmediateCapture.value_or(false);
|
||||
if (ImGui::Checkbox("FG Immediate Capture", &immediate))
|
||||
{
|
||||
LOG_DEBUG("Enabled set FGImmediateCapture: {}", immediate);
|
||||
Config::Instance()->FGImmediateCapture = immediate;
|
||||
}
|
||||
ShowHelpMarker("Enables capturing of resources before shader execution.\nIncrease hudless capture chances but might cause capturing of unnecessary resources.");
|
||||
|
||||
auto hudExtended = Config::Instance()->FGHUDFixExtended.value_or(false);
|
||||
if (ImGui::Checkbox("Extended", &hudExtended))
|
||||
if (ImGui::Checkbox("FG Extended Capture", &hudExtended))
|
||||
{
|
||||
LOG_DEBUG("Enabled set FGHUDFixExtended: {}", hudExtended);
|
||||
Config::Instance()->FGHUDFixExtended = hudExtended;
|
||||
}
|
||||
ShowHelpMarker("Extended HUDless checks, might cause crash and slowdowns!");
|
||||
ShowHelpMarker("Extended format checks for possible hudless\nMight cause crash and slowdowns!");
|
||||
|
||||
if (Config::Instance()->AdvancedSettings.value_or(false))
|
||||
{
|
||||
if (ImGui::Checkbox("FG Immediate Capture", &Config::Instance()->FGImmediateCapture))
|
||||
LOG_DEBUG("Enabled set FGImmediateCapture: {}", Config::Instance()->FGImmediateCapture);
|
||||
|
||||
ShowHelpMarker("Immediately capture of resources, before shader executions.\nIncrease hudless capture chances but might cause capturing of\nunnecessary resources.");
|
||||
|
||||
if (ImGui::Checkbox("FG Use Threading For Heap Tracking", &Config::Instance()->UseThreadingForHeaps))
|
||||
LOG_DEBUG("Enabled set UseThreadingForHeaps: {}", Config::Instance()->UseThreadingForHeaps);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#define VER_MAJOR_VERSION 0
|
||||
#define VER_MINOR_VERSION 7
|
||||
#define VER_HOTFIX_VERSION 0
|
||||
#define VER_BUILD_NUMBER 59
|
||||
#define VER_BUILD_NUMBER 60
|
||||
|
||||
#define VER_PRE_RELEASE
|
||||
|
||||
|
||||
@@ -48,10 +48,20 @@ AllowAsync=auto
|
||||
HUDFix=auto
|
||||
|
||||
; Delays HUDless image capture
|
||||
; Might cause crashes, specially if set too high
|
||||
; Might cause crashes, specially if set too high!
|
||||
; integer value above > 0 - Default (auto) is 0
|
||||
HUDLimit=auto
|
||||
|
||||
; Extended HUDless checks for more image formats
|
||||
; Might cause crash and slowdowns.
|
||||
; true or false - Default (auto) is false
|
||||
HUDFixExtended=auto
|
||||
|
||||
; Enables capturing of resources before shader execution.
|
||||
; Increase hudless capture chances but might cause capturing of unnecessary resources.
|
||||
; true or false - Default (auto) is false
|
||||
HUDFixImmadiate=auto
|
||||
|
||||
; Defines FG rectangle
|
||||
; integer value - Default (auto) is whole screen
|
||||
RectLeft=auto
|
||||
|
||||
Reference in new issue
Block a user