Direct Draw Init - One more thing

Harold Hunt Harold@compasstechnologies.com
Wed Sep 27 21:54:00 GMT 2000


I forgot to address the startup failure messages that some of you had
posted.  I am using Robert's post as an example, and I believe that I have
seen similar posts.  The following messages are printed during failed
startups of X (and some successful ones):

pwin->width=00000500
pwin->height=00000400
pwin->bitsPerPixel=00000010

Guess what?  Those are hexadecimal values; converting them to decimal gives:

pwin->widht=1280
pwin->height=1024
pwin->bitsPerPixel=16

When you run 'start Xwin -screen 0 800x600x16' you get the following
messages:

pwin->width=00000320
pwin->height=00000258
pwin->bitsPerPixel=00000010

Again, converting to decimal yields:

pwin->width=800
pwin->height=600
pwin->bitsPerPixel=16

Running 'start Xwin -screen 8 800x600x16' gives the following messages,
converted to decimal:

pwin->width=1280 (yes, 1280, that's not a typo)
pwin->height=1024
pwin->bitsPerPixel=16

Had I only bothered to convert those hex values I would have noticed that
the default 'screen 8' parameter was having absolutely no effect on the
resolution and color depth that the X/Server tried to use.  Heh, and I could
have figured out what was going on without digging around in the source :)

Cheers,

Harold


More information about the Cygwin-xfree mailing list