Implement wxColourDisplay() in terms of wxDisplay::GetDepth()
Get rid of another global display-related function, even though this one only had non-trivial implementation under MSW.
This commit is contained in:
@@ -117,27 +117,6 @@ void wxGetMousePosition( int* x, int* y )
|
||||
if ( y ) *y = pt.y;
|
||||
}
|
||||
|
||||
// Return true if we have a colour display
|
||||
bool wxColourDisplay()
|
||||
{
|
||||
// this function is called from wxDC ctor so it is called a *lot* of times
|
||||
// hence we optimize it a bit but doing the check only once
|
||||
//
|
||||
// this should be MT safe as only the GUI thread (holding the GUI mutex)
|
||||
// can call us
|
||||
static int s_isColour = -1;
|
||||
|
||||
if ( s_isColour == -1 )
|
||||
{
|
||||
ScreenHDC dc;
|
||||
int noCols = ::GetDeviceCaps(dc, NUMCOLORS);
|
||||
|
||||
s_isColour = (noCols == -1) || (noCols > 2);
|
||||
}
|
||||
|
||||
return s_isColour != 0;
|
||||
}
|
||||
|
||||
void wxDisplaySizeMM(int *width, int *height)
|
||||
{
|
||||
ScreenHDC dc;
|
||||
|
Reference in New Issue
Block a user