Skip to content

Commit 801bd26

Browse files
Etaash-mathamsettyflightlessmango
authored andcommitted
params: Restore the old transfer function on params reload.
1 parent b1ef6dc commit 801bd26

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/hud_elements.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void HudElements::convert_colors(const struct overlay_params& params)
149149
fc.w = params.alpha;
150150
if (HUDElements.colors.convert)
151151
{
152-
switch(params.transfer_function)
152+
switch (params.transfer_function)
153153
{
154154
case PQ:
155155
fc = SRGBToLinear(fc);

src/overlay_params.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,9 @@ parse_overlay_config(struct overlay_params *params,
912912
SPDLOG_DEBUG("Version: {}", MANGOHUD_VERSION);
913913
std::vector<int> default_preset = {-1, 0, 1, 2, 3, 4};
914914
auto preset = std::move(params->preset);
915+
int transfer_function = params->transfer_function;
915916
*params = {};
917+
params->transfer_function = transfer_function;
916918
params->preset = use_existing_preset ? std::move(preset) : default_preset;
917919
set_param_defaults(params);
918920
if (!use_existing_preset) {

0 commit comments

Comments
 (0)