I know this may be lame - but you MAY want to toss is a check for the 640x480x32 because some (typical user) desktops have 24 bit highcolor only. 640x480x16 or 640x480x32
I wrote a routine - as I'm sure many others have - that gets all the display modes and then you know what you're selecting and what the card has obviously - but that way you can pick the highest res available - or the RES you WANT - looking for the depth you want - if you cant get the depth - you still got the Resolution you wanted anyway
-=/Jaze/=-