avoid reading the flashrom if we know we are in VGA mode

This commit is contained in:
T_chan 2024-02-02 20:08:04 +00:00
parent 9f3f638a46
commit 58f5f52eac

View File

@ -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);
}
}
}