From 58f5f52eacef5b3a686fa0ea869daaba012bafe7 Mon Sep 17 00:00:00 2001 From: T_chan Date: Fri, 2 Feb 2024 20:08:04 +0000 Subject: [PATCH] avoid reading the flashrom if we know we are in VGA mode --- GL/platforms/sh4.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/GL/platforms/sh4.c b/GL/platforms/sh4.c index acaf692..85aaf7c 100644 --- a/GL/platforms/sh4.c +++ b/GL/platforms/sh4.c @@ -37,11 +37,13 @@ void InitGPU(_Bool autosort, _Bool fsaa) { that'll work... */ int cable = vid_check_cable(); - int region = flashrom_get_region(); - if(region == FLASHROM_REGION_EUROPE && cable != CT_VGA) { - printf("PAL region without VGA - enabling 50hz"); - vid_set_mode(DM_640x480_PAL_IL, PM_RGB565); + if(cable != CT_VGA) { + int region = flashrom_get_region(); + if (region == FLASHROM_REGION_EUROPE) { + printf("PAL region without VGA - enabling 50hz"); + vid_set_mode(DM_640x480_PAL_IL, PM_RGB565); + } } }