Merged format initialization into InitSize to allow for backends not supporting gfx transactions.
svn-id: r41801
This commit is contained in:
parent
a937dfde96
commit
7c62242315
5 changed files with 30 additions and 41 deletions
|
@ -353,23 +353,22 @@ int OSystem_SDL::getGraphicsMode() const {
|
|||
assert (_transactionMode == kTransactionNone);
|
||||
return _videoMode.mode;
|
||||
}
|
||||
|
||||
void OSystem_SDL::initSize(uint w, uint h, Graphics::PixelFormat format) {
|
||||
assert(_transactionMode == kTransactionActive);
|
||||
|
||||
#ifdef ENABLE_RGB_COLOR
|
||||
void OSystem_SDL::initFormat(Graphics::PixelFormat format) {
|
||||
assert(_transactionMode == kTransactionActive);
|
||||
|
||||
//avoid redundant format changes
|
||||
if (format == _videoMode.format)
|
||||
return;
|
||||
assert(format.bytesPerPixel > 0);
|
||||
|
||||
_videoMode.format = format;
|
||||
_transactionDetails.formatChanged = true;
|
||||
_screenFormat = format;
|
||||
}
|
||||
if (format != _videoMode.format)
|
||||
{
|
||||
_videoMode.format = format;
|
||||
_transactionDetails.formatChanged = true;
|
||||
_screenFormat = format;
|
||||
}
|
||||
#endif
|
||||
|
||||
void OSystem_SDL::initSize(uint w, uint h) {
|
||||
assert(_transactionMode == kTransactionActive);
|
||||
|
||||
// Avoid redundant res changes
|
||||
if ((int)w == _videoMode.screenWidth && (int)h == _videoMode.screenHeight)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue