From 42d18bc5f12126009628d6cd00a8f1f74e1fadb2 Mon Sep 17 00:00:00 2001 From: Shpoike Date: Sun, 30 May 2021 08:01:06 +0100 Subject: [PATCH] resize the modelviewer's texture display if it would have gone offscreen. --- engine/client/m_options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/client/m_options.c b/engine/client/m_options.c index 2aeb8480..31f6b0fe 100644 --- a/engine/client/m_options.c +++ b/engine/client/m_options.c @@ -3984,7 +3984,7 @@ static void M_ModelViewerDraw(int x, int y, struct menucustom_s *c, struct emenu w = (float)vid.width / shader->defaulttextures->base->width; h = (float)(vid.height-y) / shader->defaulttextures->base->height; - h = min(w,h); + h = min(min(w,h), 1); w = h*shader->defaulttextures->base->width; h = h*shader->defaulttextures->base->height; R2D_Image(0, y, w, h, 0, 0, 1, 1, shader);