151
181
backlight = backlight_new;
152
182
if (!backlight || XRRGetOutputProperty(dpy, output, backlight, 0, 4, False, False, None, &actual_type, &actual_format, &nitems, &bytes_after, &prop) != Success) {
153
183
backlight = backlight_legacy;
154
if (!backlight || XRRGetOutputProperty(dpy, output, backlight, 0, 4, False, False, None, &actual_type, &actual_format, &nitems, &bytes_after, &prop) != Success)
184
if (!backlight || XRRGetOutputProperty(dpy, output, backlight, 0, 4, False, False, None, &actual_type, &actual_format, &nitems, &bytes_after, &prop) != Success) {
155
186
PsychErrorExitMsg(PsychError_user, "Failed to query current display brightness from system. Unsupported feature?");
158
190
if (actual_type != XA_INTEGER || nitems != 1 || actual_format != 32) {
160
193
PsychErrorExitMsg(PsychError_user, "Failed to query current display brightness from system. Unsupported feature?");
162
195
value = *((long *) prop);