Skip to content

Commit

Permalink
be more specific in resource warnings
Browse files Browse the repository at this point in the history
Fix false: Warning - Unable to get display calibration
It was mentioned in issue #4.
  • Loading branch information
beku committed Feb 18, 2018
1 parent f95abc1 commit a70156d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xcalib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,8 +1015,8 @@ main (int argc, char *argv[])
if (xrr_version >= 102)
{
XRRCrtcGamma * gamma = 0;
if((gamma = XRRGetCrtcGamma(dpy, crtc)) != 0 )
warning ("Unable to get display calibration");
if((gamma = XRRGetCrtcGamma(dpy, crtc)) == 0 )
warning ("XRRGetCrtcGamma() is unable to get display calibration");

for (i = 0; i < ramp_size; i++) {
r_ramp[i] = gamma->red[i];
Expand All @@ -1025,10 +1025,10 @@ main (int argc, char *argv[])
}
}
else if (!XF86VidModeGetGammaRamp (dpy, screen, ramp_size, r_ramp, g_ramp, b_ramp))
warning ("Unable to get display calibration");
warning ("XF86VidModeGetGammaRamp() is unable to get display calibration");
#else
if (!GetDeviceGammaRamp(hDc, &winGammaRamp))
warning ("Unable to get display calibration");
warning ("GetDeviceGammaRamp() is unable to get display calibration");

for (i = 0; i < ramp_size; i++) {
r_ramp[i] = winGammaRamp.Red[i];
Expand Down

0 comments on commit a70156d

Please sign in to comment.