aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorrsn88872017-12-02 11:46:11 -0600
committerrsn88872017-12-02 11:53:23 -0600
commitd73437c293c2f47cab48c46f844eb6ba0ad95528 (patch)
treef917913b1a642ec94d6e8ee403c344f863df8518 /backends
parent98147a6c0858d677b4b5a78b592f8a200e955a5b (diff)
downloadscummvm-rg350-d73437c293c2f47cab48c46f844eb6ba0ad95528.tar.gz
scummvm-rg350-d73437c293c2f47cab48c46f844eb6ba0ad95528.tar.bz2
scummvm-rg350-d73437c293c2f47cab48c46f844eb6ba0ad95528.zip
PSP2: fix odd resolutions on PSP2, fixes Phantasmagoria
Diffstat (limited to 'backends')
-rw-r--r--backends/graphics/psp2sdl/psp2sdl-graphics.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/graphics/psp2sdl/psp2sdl-graphics.cpp b/backends/graphics/psp2sdl/psp2sdl-graphics.cpp
index affcf9d8f5..f7d6bcb44b 100644
--- a/backends/graphics/psp2sdl/psp2sdl-graphics.cpp
+++ b/backends/graphics/psp2sdl/psp2sdl-graphics.cpp
@@ -459,6 +459,10 @@ void PSP2SdlGraphicsManager::setAspectRatioCorrection(bool enable) {
}
SDL_Surface *PSP2SdlGraphicsManager::SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) {
+ // Vita requires resolution to be divisible by eight
+ width-=width%8;
+ height-=height%8;
+
SDL_Surface *screen = SurfaceSdlGraphicsManager::SDL_SetVideoMode(width, height, bpp, flags);
if (screen != nullptr) {