aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/wii
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/wii')
-rw-r--r--backends/platform/wii/osystem_gfx.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index 8381e4b9c1..3d4e75883b 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -240,11 +240,24 @@ void OSystem_Wii::initSize(uint width, uint height,
}
#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);
+ }
+
+ 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 = width;
- _gameHeight = height;
+ _gameWidth = newWidth;
+ _gameHeight = newHeight;
update = true;
}