From 74df590696210f20503a2e15bae404978e3a3553 Mon Sep 17 00:00:00 2001 From: notaz Date: Fri, 4 Jan 2013 23:50:05 +0200 Subject: [PATCH] gpulib: limit height --- plugins/gpulib/gpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/gpulib/gpu.c b/plugins/gpulib/gpu.c index 53fe0bcd..337e27a7 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; -- 2.39.2