diff --git a/pfba/gui/config.cpp b/pfba/gui/config.cpp index fa17db6..fd7d9fe 100644 --- a/pfba/gui/config.cpp +++ b/pfba/gui/config.cpp @@ -73,9 +73,9 @@ Config::Config(const std::string &cfgPath) { // default rom config options_gui.push_back(Option("ROM", {"ROM"}, 0, Option::Index::MENU_ROM_OPTIONS, Option::Type::MENU)); - options_gui.push_back(Option("SCALING", {"NONE", "2X", "FIT", "FULL"}, 1, Option::Index::ROM_SCALING)); + options_gui.push_back(Option("SCALING", {"NONE", "2X", "FIT", "FULL", "FIT 4:3"}, 4, Option::Index::ROM_SCALING)); options_gui.push_back( - Option("FILTER", {"POINT", "LINEAR"}, 0, Option::Index::ROM_FILTER)); + Option("FILTER", {"POINT", "LINEAR"}, 1, Option::Index::ROM_FILTER)); options_gui.push_back( Option("SHADER", {"NONE", "SHARP", "SHARP+SCAN", "LCD3X", "AAA", "SCALE2X"}, 2, Option::Index::ROM_SHADER)); options_gui.push_back(Option("ROTATION", {"OFF", "ON"}, 0, Option::Index::ROM_ROTATION)); diff --git a/pfba/run.cpp b/pfba/run.cpp index 575d76e..ac4f3e6 100644 --- a/pfba/run.cpp +++ b/pfba/run.cpp @@ -109,7 +109,7 @@ int RunOneFrame(bool bDraw, int bDrawFps, int fps) { } else if ((players[0].state & Input::Key::KEY_COIN) && (players[0].state & Input::Key::KEY_UP)) { int scaling = gui->GetConfig()->GetRomValue(Option::Index::ROM_SCALING) + 1; - if (scaling <= 3) { + if (scaling <= 4) { int index = gui->GetConfig()->GetOptionPos(gui->GetConfig()->GetRomOptions(), Option::Index::ROM_SCALING); gui->GetConfig()->GetRomOptions()->at(index).value = scaling; diff --git a/pfba/video.cpp b/pfba/video.cpp index a1ed3e9..fd95424 100644 --- a/pfba/video.cpp +++ b/pfba/video.cpp @@ -115,6 +115,20 @@ void Video::Scale() { } break; + case 4: // fit 4:3 + if(rotation == 0 || rotation == 180) { + scale.h = window.h; + scale.w = (int) (((float) scale.h * 4.0) / 3.0); + if(scale.w > window.w) { + scale.w = window.w; + scale.h = (int) (((float) scale.w * 3.0) / 4.0); + } + } else { + scale.w = window.h; + scale.h = (int) (((float) scale.w * 4.0) / 3.0); + } + break; + default: break; }