aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-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;