From d323b545ced3311edefe0e950a56ce30c6f86774 Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Thu, 19 Feb 2009 19:37:03 +0000 Subject: [PATCH] Fix possible crash in extreme resolutions with wide and tall pixels. Manu factor was computed too big, causing clipped palette and windows didn't fit. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@643 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- graph.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graph.c b/graph.c index c8abbdf0..5e014492 100644 --- a/graph.c +++ b/graph.c @@ -336,9 +336,9 @@ int Initialiser_mode_video(int Largeur, int Hauteur, int Fullscreen) Menu_Facteur_X=1; Menu_Facteur_Y=1; } - if (Pixel_height>Pixel_width && Largeur_ecran>=640) + if (Pixel_height>Pixel_width && Largeur_ecran>=Menu_Facteur_X*2*320) Menu_Facteur_X*=2; - else if (Pixel_width>Pixel_height && Hauteur_ecran>=400) + else if (Pixel_width>Pixel_height && Hauteur_ecran>=Menu_Facteur_Y*2*200) Menu_Facteur_Y*=2; if (Buffer_de_ligne_horizontale)