mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 22:01:46 +00:00
[client] egl: invalidate the window when HDR settings are changed
This commit is contained in:
parent
54066094bd
commit
eeea24ebfb
1 changed files with 17 additions and 3 deletions
|
@ -288,13 +288,27 @@ void egl_desktopConfigUI(EGL_Desktop * desktop)
|
|||
igSliderInt("##nvgain", &desktop->nvGain, 0, desktop->nvMax, format, 0);
|
||||
igPopItemWidth();
|
||||
|
||||
bool mapHDRtoSDR = desktop->mapHDRtoSDR;
|
||||
int peakLuminance = desktop->peakLuminance;
|
||||
int maxCLL = desktop->maxCLL;
|
||||
|
||||
igSeparator();
|
||||
igCheckbox("Map HDR content to SDR", &desktop->mapHDRtoSDR);
|
||||
igSliderInt("Peak Luminance", &desktop->peakLuminance, 1, 10000,
|
||||
igCheckbox("Map HDR content to SDR", &mapHDRtoSDR);
|
||||
igSliderInt("Peak Luminance", &peakLuminance, 1, 10000,
|
||||
"%d nits",
|
||||
ImGuiInputTextFlags_CharsDecimal);
|
||||
igSliderInt("Max content light level", &desktop->maxCLL, 1, 10000,
|
||||
igSliderInt("Max content light level", &maxCLL, 1, 10000,
|
||||
"%d nits", ImGuiInputTextFlags_CharsDecimal);
|
||||
|
||||
if (mapHDRtoSDR != desktop->mapHDRtoSDR ||
|
||||
peakLuminance != desktop->peakLuminance ||
|
||||
maxCLL != desktop->maxCLL)
|
||||
{
|
||||
desktop->mapHDRtoSDR = mapHDRtoSDR;
|
||||
desktop->peakLuminance = max(1, peakLuminance);
|
||||
desktop->maxCLL = max(1, maxCLL);
|
||||
app_invalidateWindow(true);
|
||||
}
|
||||
}
|
||||
|
||||
bool egl_desktopSetup(EGL_Desktop * desktop, const LG_RendererFormat format)
|
||||
|
|
Loading…
Reference in a new issue