mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 04:56:00 +01:00
drm/atomic: fix gamma resetting
thanks @ikalco
This commit is contained in:
parent
ee0dea62e2
commit
996cc6f6a4
1 changed files with 4 additions and 1 deletions
|
@ -238,7 +238,10 @@ bool Aquamarine::CDRMAtomicImpl::prepareConnector(Hyprutils::Memory::CSharedPoin
|
||||||
if (STATE.committed & COutputState::AQ_OUTPUT_STATE_GAMMA_LUT) {
|
if (STATE.committed & COutputState::AQ_OUTPUT_STATE_GAMMA_LUT) {
|
||||||
if (!connector->crtc->props.gamma_lut) // TODO: allow this with legacy gamma, perhaps.
|
if (!connector->crtc->props.gamma_lut) // TODO: allow this with legacy gamma, perhaps.
|
||||||
connector->backend->backend->log(AQ_LOG_ERROR, "atomic drm: failed to commit gamma: no gamma_lut prop");
|
connector->backend->backend->log(AQ_LOG_ERROR, "atomic drm: failed to commit gamma: no gamma_lut prop");
|
||||||
else {
|
else if (STATE.gammaLut.empty()) {
|
||||||
|
data.atomic.gammaLut = 0;
|
||||||
|
data.atomic.gammad = true;
|
||||||
|
} else {
|
||||||
std::vector<drm_color_lut> lut;
|
std::vector<drm_color_lut> lut;
|
||||||
lut.resize(STATE.gammaLut.size() / 3); // [r,g,b]+
|
lut.resize(STATE.gammaLut.size() / 3); // [r,g,b]+
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue