Skip to content

Commit

Permalink
Add Reload Settings button
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueAmulet committed May 23, 2023
1 parent 786f4c8 commit 72c624d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dxvk/imgui/dxvk_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,11 @@ namespace dxvk {
}
ImGui::SetTooltipToLastWidgetOnHover("This will save above settings in the rtx.conf file. Some may only take effect on next launch.");

ImGui::SameLine();
if (ImGui::Button("Reload Settings")) {
RtxOptions::Get()->reload();
}

ImGui::SameLine();
if (ImGui::Button("Reset Settings")) {
RtxOptions::Get()->reset();
Expand Down
6 changes: 6 additions & 0 deletions src/dxvk/rtx_render/rtx_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,12 @@ namespace dxvk {
Config::serializeCustomConfig(newConfig, kRtxConfigFilePath, "rtx.");
}

void reload() {
// TODO: baseGameModPath?
RtxOption<bool>::resetOptions();
RtxOption<bool>::readOptions(Config::getRtxUserConfig(""));
}

void reset() {
RtxOption<bool>::resetOptions();
}
Expand Down

0 comments on commit 72c624d

Please sign in to comment.