mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-11 10:30:09 +00:00
When using CGIMAGEREF drawing strategy, allow any bit depth
This commit is contained in:
parent
762b76f565
commit
f537fee92f
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
*
|
*
|
||||||
* Basilisk II (C) 1997-2001 Christian Bauer
|
* Basilisk II (C) 1997-2003 Christian Bauer
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -281,6 +281,21 @@
|
|||||||
edited = YES;
|
edited = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// If we are not using the CGIMAGEREF drawing strategy,
|
||||||
|
// then source bitmaps must be 32bits deep.
|
||||||
|
|
||||||
|
- (short) testWinDepth: (int) newbpp
|
||||||
|
{
|
||||||
|
#ifdef CGIMAGEREF
|
||||||
|
return newbpp;
|
||||||
|
#else
|
||||||
|
if ( newbpp != 32 )
|
||||||
|
WarningSheet(@"Sorry - In windowed mode, depth must be 32", panel);
|
||||||
|
return 32
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// This is called when any of the screen/openGL/window,
|
// This is called when any of the screen/openGL/window,
|
||||||
// width, height or depth is clicked.
|
// width, height or depth is clicked.
|
||||||
//
|
//
|
||||||
@ -314,44 +329,38 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If we are changing type, supply some sensible defaults
|
// If we are changing type, supply some sensible defaults
|
||||||
|
|
||||||
|
short screenx = CGDisplayPixelsWide(kCGDirectMainDisplay),
|
||||||
|
screeny = CGDisplayPixelsHigh(kCGDirectMainDisplay),
|
||||||
|
screenb = CGDisplayBitsPerPixel(kCGDirectMainDisplay);
|
||||||
|
|
||||||
if ( newtype != display_type )
|
if ( newtype != display_type )
|
||||||
{
|
{
|
||||||
D(NSLog(@"Changing display type in ChangeScreen"));
|
D(NSLog(@"Changing display type in ChangeScreen"));
|
||||||
if ( newtype == DISPLAY_SCREEN ) // If changing to full screen
|
|
||||||
{
|
|
||||||
// supply main screen dimensions as a default
|
|
||||||
newx = CGDisplayPixelsWide (kCGDirectMainDisplay);
|
|
||||||
newy = CGDisplayPixelsHigh (kCGDirectMainDisplay);
|
|
||||||
newbpp = CGDisplayBitsPerPixel(kCGDirectMainDisplay);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( display_type == DISPLAY_SCREEN ) // If changing from full screen
|
// If changing to full screen, supply main screen dimensions as a default
|
||||||
|
if ( newtype == DISPLAY_SCREEN )
|
||||||
|
newx = screenx, newy = screeny, newbpp = screenb;
|
||||||
|
|
||||||
|
// If changing from full screen, use minimum screen resolutions
|
||||||
|
if ( display_type == DISPLAY_SCREEN )
|
||||||
{
|
{
|
||||||
newx = MIN_WIDTH, newy = MIN_HEIGHT;
|
newx = MIN_WIDTH, newy = MIN_HEIGHT;
|
||||||
#ifndef MAC_OS_X_VERSION_SUPPORTS_LOWER_DEPTHS
|
newbpp = [self testWinDepth: newbpp];
|
||||||
newbpp = 32;
|
}
|
||||||
#endif
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newbpp = [self testWinDepth: newbpp];
|
||||||
|
|
||||||
|
// Check size is within ranges of MIN_WIDTH ... MAX_WIDTH
|
||||||
|
// and MIN_HEIGHT ... MAX_HEIGHT
|
||||||
|
// ???
|
||||||
}
|
}
|
||||||
|
|
||||||
[width setIntValue: newx];
|
[width setIntValue: newx];
|
||||||
[height setIntValue: newy];
|
[height setIntValue: newy];
|
||||||
[depth setIntValue: newbpp];
|
[depth setIntValue: newbpp];
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#ifndef MAC_OS_X_VERSION_SUPPORTS_LOWER_DEPTHS
|
|
||||||
// Check depth
|
|
||||||
|
|
||||||
if ( display_type == DISPLAY_WINDOW && newbpp != 32 )
|
|
||||||
{
|
|
||||||
WarningSheet(@"Sorry - In windowed mode, depth must be 32", panel);
|
|
||||||
[depth setIntValue: 32];
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
// Check size is within ranges of MIN_WIDTH ... MAX_WIDTH
|
|
||||||
// and MIN_HEIGHT ... MAX_HEIGHT
|
|
||||||
// ???
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Store new prefs
|
// Store new prefs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user