diff --git a/pfba/gui/config.cpp b/pfba/gui/config.cpp index fd7d9fe..90b2095 100644 --- a/pfba/gui/config.cpp +++ b/pfba/gui/config.cpp @@ -73,7 +73,7 @@ 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", "FIT 4:3"}, 4, Option::Index::ROM_SCALING)); + options_gui.push_back(Option("SCALING", {"NONE", "2X", "FIT", "FULL", "FIT 4:3", "FIT 3:4"}, 5, Option::Index::ROM_SCALING)); options_gui.push_back( Option("FILTER", {"POINT", "LINEAR"}, 1, Option::Index::ROM_FILTER)); options_gui.push_back( diff --git a/pfba/run.cpp b/pfba/run.cpp index ac4f3e6..605b466 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 <= 4) { + if (scaling <= 5) { 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 fd95424..2f560b5 100644 --- a/pfba/video.cpp +++ b/pfba/video.cpp @@ -129,6 +129,20 @@ void Video::Scale() { } break; + case 5: // fit 3:4 + if(rotation == 0 || rotation == 180) { + scale.h = window.h; + scale.w = (int) (((float) scale.h * 3.0) / 4.0); + if(scale.w > window.w) { + scale.w = window.w; + scale.h = (int) (((float) scale.w * 4.0) / 3.0); + } + } else { + scale.w = window.h; + scale.h = (int) (((float) scale.w * 3.0) / 4.0); + } + break; + default: break; }