Skip to content

Commit 451ca84

Browse files
committed
force correct ratio for intro
1 parent 0840483 commit 451ca84

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/Menu/IntroState.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace OpenXcom
3636
* Initializes all the elements in the Intro screen.
3737
* @param game Pointer to the core game.
3838
*/
39-
IntroState::IntroState(Game *game) : State(game)
39+
IntroState::IntroState(Game *game, bool wasLetterBoxed) : State(game), _wasLetterBoxed(wasLetterBoxed)
4040
{
4141
_introFile = CrossPlatform::getDataFile("UFOINTRO/UFOINT.FLI");
4242
_introSoundFileDOS = CrossPlatform::getDataFile("SOUND/INTRO.CAT");
@@ -447,6 +447,7 @@ void IntroState::init()
447447
Mix_HaltMusic();
448448
#endif
449449
}
450+
Options::keepAspectRatio = _wasLetterBoxed;
450451
_game->setState(new MainMenuState(_game));
451452
}
452453

src/Menu/IntroState.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ class IntroState : public State
3131
{
3232
private:
3333
std::string _introFile, _introSoundFileDOS, _introSoundFileWin;
34+
bool _wasLetterBoxed;
3435
public:
3536
/// Creates the Intro state.
36-
IntroState(Game *game);
37+
IntroState(Game *game, bool wasLetterBoxed);
3738
/// Cleans up the Intro state.
3839
~IntroState();
3940
/// Starts the intro.

src/Menu/StartState.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,12 @@ void StartState::think()
137137
Log(LOG_INFO) << "OpenXcom started successfully!";
138138
if (!Options::reload && Options::playIntro)
139139
{
140-
_game->setState(new IntroState(_game));
140+
Options::keepAspectRatio = true;
141+
_game->setState(new IntroState(_game, _wasLetterBoxed));
141142
}
142143
else
143144
{
145+
Options::keepAspectRatio = _wasLetterBoxed;
144146
_game->setState(new MainMenuState(_game));
145147
Options::reload = false;
146148
}
@@ -150,7 +152,6 @@ void StartState::think()
150152
default:
151153
break;
152154
}
153-
Options::keepAspectRatio = _wasLetterBoxed;
154155
}
155156

156157
/**

0 commit comments

Comments
 (0)