Skip to content

Commit

Permalink
ENGINES: Use common GFX code for 3D games - fixes part of bug #14342
Browse files Browse the repository at this point in the history
Now, when the launcher is in full screen, the game will also be in full
screen. However, when returning to the launcher, graphics are reset to
default with a setupGraphics() call. Thus, if the user hasn't selected
full screen display in the options, but only used alt-enter to change
the launcher to full screen, the launcher will return to window mode.

initCommonGFX() also applies the following to 3D games:
- Filtering mode
- Sets the scaler
- Sets the shader
  • Loading branch information
bluegr committed Nov 19, 2024
1 parent ebfef70 commit 1a26ce5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions engines/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,8 @@ void initGraphics(int width, int height) {
void initGraphics3d(int width, int height) {
g_system->beginGFXTransaction();
g_system->setGraphicsMode(0, OSystem::kGfxModeRender3d);
initCommonGFX();
g_system->initSize(width, height);
g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen")); // TODO: Replace this with initCommonGFX()
g_system->setFeatureState(OSystem::kFeatureAspectRatioCorrection, ConfMan.getBool("aspect_ratio")); // TODO: Replace this with initCommonGFX()
g_system->setFeatureState(OSystem::kFeatureVSync, ConfMan.getBool("vsync")); // TODO: Replace this with initCommonGFX()
g_system->setStretchMode(ConfMan.get("stretch_mode").c_str()); // TODO: Replace this with initCommonGFX()
g_system->endGFXTransaction();

if (!splash && !GUI::GuiManager::instance()._launched) {
Expand Down

0 comments on commit 1a26ce5

Please sign in to comment.