[haiku-development] Re: New Screen Pref

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 12 Jul 2007 14:53:54 +0200

> > #define DUALHEAD_ON (2<<6)
> >
> > should be the same as
> >
> > #define DUALHEAD_ON (1<<7)
> >
> > and
> >
> > #define DUALHEAD_BITS (3<<6)
> >
> > should be the same as
> >
> > #define DUALHEAD_BITS ((1<<6) | (1<<7))
> >
> ok the first part I understand :) but 2<<6 same as 1<<7.

"2" means the second bit is set in the value. "1" means the first bit is 
set. So "2 << 6" is the same as "1 << 7". In both cases that 8th bit (or 
the bit at index 7 (first bit has index 0)) is "on".

> the screen pref has
> enum {
>     SHOW_COMBINE_FIELD        = 0x01,
>     SHOW_SWAP_FIELD            = 0x02,
>     SHOW_LAPTOP_PANEL_FIELD    = 0x04,
>     SHOW_TV_STANDARD_FIELD    = 0x08,
> };
> I gues that this are the part we was talking about and I found this on 
> the pref app

No. This is just for telling which interface elements should be showing. 
You need to find the place where it figures out which of these flags to 
use, that should be the place where it communicates with the driver.

> RADEON_MODE_MULTIMON_REQUEST
> I will have to do more digging when I have the source/are in other OS 
> than windows.

I guess this is an ioctl command for the driver? I don't know. I hope you 
can figure it out from here. :-)

Best regards,
-Stephan

Other related posts: