aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpulib
diff options
context:
space:
mode:
authornotaz2013-01-04 23:50:05 +0200
committernotaz2013-01-05 04:54:38 +0200
commit74df590696210f20503a2e15bae404978e3a3553 (patch)
tree0e0508d89ca81d725411e39c15b6832aaf81281e /plugins/gpulib
parentee9afdbd4d9e0aee75dd9e17878c76f1c7236d04 (diff)
downloadpcsx_rearmed-74df590696210f20503a2e15bae404978e3a3553.tar.gz
pcsx_rearmed-74df590696210f20503a2e15bae404978e3a3553.tar.bz2
pcsx_rearmed-74df590696210f20503a2e15bae404978e3a3553.zip
gpulib: limit height
Diffstat (limited to 'plugins/gpulib')
-rw-r--r--plugins/gpulib/gpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/gpulib/gpu.c b/plugins/gpulib/gpu.c
index 53fe0bc..337e27a 100644
--- a/plugins/gpulib/gpu.c
+++ b/plugins/gpulib/gpu.c
@@ -68,10 +68,11 @@ static noinline void update_width(void)
static noinline void update_height(void)
{
+ // TODO: emulate this properly..
int sh = gpu.screen.y2 - gpu.screen.y1;
if (gpu.status.dheight)
sh *= 2;
- if (sh <= 0)
+ if (sh <= 0 || sh > gpu.screen.vres)
sh = gpu.screen.vres;
gpu.screen.h = sh;