[Scummvm-cvs-logs] SF.net SVN: scummvm:[48752] scummvm/branches/branch-1-1-0/backends/platform /wii/osystem_gfx.cpp
dhewg at users.sourceforge.net
dhewg at users.sourceforge.net
Tue Apr 20 20:25:08 CEST 2010
Revision: 48752
http://scummvm.svn.sourceforge.net/scummvm/?rev=48752&view=rev
Author: dhewg
Date: 2010-04-20 18:25:08 +0000 (Tue, 20 Apr 2010)
Log Message:
-----------
Backport of r48751: Round up the game texture dimensions if the requested size is incompatible to the hardware.
Modified Paths:
--------------
scummvm/branches/branch-1-1-0/backends/platform/wii/osystem_gfx.cpp
Modified: scummvm/branches/branch-1-1-0/backends/platform/wii/osystem_gfx.cpp
===================================================================
--- scummvm/branches/branch-1-1-0/backends/platform/wii/osystem_gfx.cpp 2010-04-20 18:24:14 UTC (rev 48751)
+++ scummvm/branches/branch-1-1-0/backends/platform/wii/osystem_gfx.cpp 2010-04-20 18:25:08 UTC (rev 48752)
@@ -240,11 +240,24 @@
}
#endif
- if (_gameWidth != width || _gameHeight != height) {
- assert((width <= 640) && (height <= 480));
+ uint newWidth, newHeight;
+ if (_pfGame.bytesPerPixel > 1) {
+ newWidth = ROUNDUP(width, 4);
+ newHeight = ROUNDUP(height, 4);
+ } else {
+ newWidth = ROUNDUP(width, 8);
+ newHeight = ROUNDUP(height, 4);
+ }
- _gameWidth = width;
- _gameHeight = height;
+ if (_gameWidth != newWidth || _gameHeight != newHeight) {
+ assert((newWidth <= 640) && (newHeight <= 480));
+
+ if (width != newWidth || height != newHeight)
+ printf("extending texture for compability: %ux%u -> %ux%u\n",
+ width, height, newWidth, newHeight);
+
+ _gameWidth = newWidth;
+ _gameHeight = newHeight;
update = true;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list