Getting desktop colour depth
Blitz3D Forums/Blitz3D Programming/Getting desktop colour depth
| ||
There has been many posts about how to get the desktop resolution but how do you get the desktop colour depth? |
| ||
I don't know the answer to this, myself. So I did a bit of searching for you and found a DLL userlib that extends Blitz's OS functions (which I would assume includes current resolution and color depth). I hope this is what I think it is. http://www.blitzcoder.com/cgi-bin/showcase/showcase_showentry.pl?id=Rob__Hutchinson01222002120752&comments=no |
| ||
I won't swear to this off-hand without testing, but I seem to recall that calling GraphicsDepth () before setting a graphics mode will do it. Perhaps it was a particular incarnation of Blitz that did it...? |
| ||
Here I go again answering my own questions. Another way... bank = CreateBank(4) API_CopyMemoryPntrAddr bank,FrontBuffer() + 100,4 depth = PeekInt(bank,0) FreeBank bank and userlib adjustment: lib "kernel32.dll" API_CopyMemoryPntrAddr%(Destination*,Source%,Length%) : "RtlMoveMemory" |
| ||
Just looked through blitz'sys, that's good stuff. |