[argyllcms] Re: Fix for loading dual monitor profiles with dispwin

  • From: Graeme Gill <graeme@xxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Tue, 03 Apr 2012 13:35:25 +1000

James E. Blair wrote:
> I have a dual-monitor setup, and noticed that when I apply saved
> profiles with dispwin, it works on monitor #2 but fails on #1 with
> this error:

Hi,
        thanks for tracking that down.

> Which lead me to jcnf.c.  It looks like in jcnf_locate_key, when ix
> was -1 (to indicate a search), it would always set the start of the
> search to nkeys-1, which explains why the second monitor works but not
> the first.  Since jcnf_locate_key can be called to search both
> backwards and forwards, I think it needs to initialize the start index
> accordingly.  The attached patch sets ix to 0 if it's called to do a
> forward search, and the current behavior for a backward search.  After
> making that change, it seems to have solved the initial problem:

I think the actual bug is not setting ix = 0 before calling 
jcnf_locate_key(fwd),
but your fix of changing the API semantics so that ix = -1 means search from 
the other
end is probably a better. It should be fixed in the next release.

Graeme Gill.

Other related posts: