benbenius / glidehqplusglitch64

Automatically exported from code.google.com/p/glidehqplusglitch64
0 stars 0 forks source link

Screen ratio calculation bug? #270

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Glide64\Main.cpp

switch (settings.aspectmode)
  case 0: //4:3
    if (settings.scr_res_x >= settings.scr_res_y * 4.0f / 3.0f) {
      settings.res_y = settings.scr_res_y;
      settings.res_x = (wxUint32)(settings.res_y * 4.0f / 3.0f);
    } else {
      settings.res_x = settings.scr_res_x;
      settings.res_y = (wxUint32)(settings.res_x / 4.0f * 3.0f);
    }
    break;
  case 1: //16:9
    if (settings.scr_res_x >= settings.scr_res_y * 16.0f / 9.0f) {
      settings.res_y = settings.scr_res_y;
      settings.res_x = (wxUint32)(settings.res_y * 16.0f / 9.0f);
    } else {
      settings.res_x = settings.scr_res_x;
      settings.res_y = (wxUint32)(settings.res_x / 16.0f * 9.0f);
    }

Shouldn't the else for 4:3 be
settings.res_y = (wxUint32)((float)(settings.res_x * 3.0f) / 4.0f);
and 16:9 be
settings.res_y = (wxUint32)((float)(settings.res_x * 9.0f) / 16.0f);

Original issue reported on code.google.com by pokefan0...@gmail.com on 24 Sep 2011 at 3:31

GoogleCodeExporter commented 8 years ago
Just ignore and close(see wrongly).

Original comment by pokefan0...@gmail.com on 24 Sep 2011 at 3:57

GoogleCodeExporter commented 8 years ago

Original comment by gon...@ngs.ru on 25 Sep 2011 at 7:47