Skip to content

Commit 7c6365d

Browse files
committed
more title-specific OGL scaling factor adjustments
1 parent 5450537 commit 7c6365d

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Source/ui_qt/mainwindow.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,12 +449,20 @@ void MainWindow::BootArcadeMachine(fs::path arcadeDefPath)
449449
try
450450
{
451451
// not the right place for this . . .
452-
if(arcadeDefPath == "wanganmd.arcadedef" || arcadeDefPath == "sbxc.arcadedef" || arcadeDefPath == "fghtjam.arcadedef" || arcadeDefPath == "superdbz.arcadedef")
452+
std::map<std::string, int> ogl_scale_factors;
453+
ogl_scale_factors["wanganmd"] = 4; // works at all scaling factors
454+
ogl_scale_factors["superdbz"] = 4; // works at all scaling factors
455+
ogl_scale_factors["fghtjam"] = 2; // scale factor 2 fixes mis-aligned character sprite segments
456+
ogl_scale_factors["sbxc"] = 1; // scale factor 1 fixes mis-aligned first column in opening video
457+
ogl_scale_factors["tekken51"] = 1; // scale factor 1 fixes vertical black lines
458+
ogl_scale_factors["default"] = 1;
459+
460+
if(ogl_scale_factors.count(arcadeDefPath.stem().string()))
453461
{
454-
CAppConfig::GetInstance().SetPreferenceInteger(PREF_CGSH_OPENGL_RESOLUTION_FACTOR, 4);
462+
CAppConfig::GetInstance().SetPreferenceInteger(PREF_CGSH_OPENGL_RESOLUTION_FACTOR, ogl_scale_factors[arcadeDefPath.stem().string()]);
455463
}
456464
else {
457-
CAppConfig::GetInstance().SetPreferenceInteger(PREF_CGSH_OPENGL_RESOLUTION_FACTOR, 1);
465+
CAppConfig::GetInstance().SetPreferenceInteger(PREF_CGSH_OPENGL_RESOLUTION_FACTOR, ogl_scale_factors["default"]);
458466
}
459467

460468
ArcadeUtils::BootArcadeMachine(m_virtualMachine, arcadeDefPath);

0 commit comments

Comments
 (0)