mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-03 03:18:09 -06:00
* Qt: Add FSR settings to settings GUI * Move FSR settings from Imgui.ini to main config * move passing fsr settings to presenter constuctor * cleanup: use struct instead of function call * cleanup: make variable names consistent with others * Update fsr settings real-time in qt, save button in Imgui * Linux build fix, missing running game check * syntax fix * Change gamerunning checks to if (presenter)
42 lines
1.2 KiB
C++
42 lines
1.2 KiB
C++
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "options.h"
|
|
|
|
#include <memory>
|
|
#include <imgui.h>
|
|
|
|
#include "video_core/renderer_vulkan/vk_presenter.h"
|
|
|
|
extern std::unique_ptr<Vulkan::Presenter> presenter;
|
|
|
|
namespace Core::Devtools {
|
|
|
|
TOptions Options;
|
|
|
|
void LoadOptionsConfig(const char* line) {
|
|
char str[512];
|
|
int i;
|
|
float f;
|
|
if (sscanf(line, "disassembler_cli_isa=%511[^\n]", str) == 1) {
|
|
Options.disassembler_cli_isa = str;
|
|
return;
|
|
}
|
|
if (sscanf(line, "disassembler_cli_spv=%511[^\n]", str) == 1) {
|
|
Options.disassembler_cli_spv = str;
|
|
return;
|
|
}
|
|
if (sscanf(line, "frame_dump_render_on_collapse=%d", &i) == 1) {
|
|
Options.frame_dump_render_on_collapse = i != 0;
|
|
return;
|
|
}
|
|
}
|
|
|
|
void SerializeOptionsConfig(ImGuiTextBuffer* buf) {
|
|
buf->appendf("disassembler_cli_isa=%s\n", Options.disassembler_cli_isa.c_str());
|
|
buf->appendf("disassembler_cli_spv=%s\n", Options.disassembler_cli_spv.c_str());
|
|
buf->appendf("frame_dump_render_on_collapse=%d\n", Options.frame_dump_render_on_collapse);
|
|
}
|
|
|
|
} // namespace Core::Devtools
|