Skip to content

Conversation

@Mauller
Copy link

@Mauller Mauller commented Jan 3, 2026

This PR implements the hiding of the custom SH overlay during video playback.
It also adds fixes to correctly scale the campaign videos instead of stretching them to fit the screen.

The campaign video playback was moved from within the window handler to the display object, this allows a central place to detect video playback, making the hiding of the video overlay during video playback simpler.

It also allowed reusing current video scaling code used for the opening videos for the campaign videos.

The Video scaling can be disabled but is enabled by default as this allows the true aspect of the videos to be seen by users.

The code for the load screen video playback was also simplified and removed the "Hacky" (EA words for it) code that tried to show and increment the loading bar as the video played.
Instead the loading bar is completely hidden during video playback and only used during asset loading.


TODO

  • Replicate campaign video scaling in generals

@Mauller Mauller self-assigned this Jan 3, 2026
@Mauller Mauller added GUI For graphical user interface Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour labels Jan 3, 2026
@Mauller Mauller force-pushed the Mauller/fix-overlays-during-video-playback branch from 902fe9f to b12ed42 Compare January 3, 2026 17:29
@Mauller
Copy link
Author

Mauller commented Jan 3, 2026

Missed gui edits display header file so the initial PR was not building.

Int hudOffsetY = 0;

// TheSuperHackers @info During video playback we don't want custom overlay elements showing
if (TheDisplay->isMoviePlaying())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this test perhaps be higher up the call chain? Because it seems oddly specific to just return this call and none of the other window draw functions. Why are the other window draw functions not necessary to exclude from video playback?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The custom overlay we added as a post post draw is the only one that really interferes with video playback, the majority of the other draw functions don't enter the code within themselves since there is no text or other objects to display.

Bool m_sounds3DOn;
Bool m_speechOn;
Bool m_videoOn;
Bool m_videoScaled; // TheSuperHackers @info Maintain correct scaling of video playback
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is video scale an accurate terminology for this? I would have expected something like "KeepVideoAspectRatio" or "NoDisproportionalStretchedVideo"

Because with m_videoScaled=false I expect the video to play back with original bik video file resolution (for example 800x600) and with m_videoScaled=true I expect the video to scale to something unspecified.

Maybe m_videoFitWindow=true would work.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the terminoligy to use "MaintainVideoAspect"

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use m_videoMaintainAspect so that it still sorts into m_videoOn, same as the INI option name.

*/
m_ambientLoop.setEventName("LoadScreenAmbient");
// create the new stream
m_videoStream = TheVideoPlayer->open( TheCampaignManager->getCurrentMission()->m_movieLabel );
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are m_videoStream, m_videoBuffer still required to exist then?

Would it make sense to first make a single refactor change that merges all the video playbacks into the same code before doing any of the other changes?

Because it looks to me that this change does multiple different but related things right now.

Copy link
Author

@Mauller Mauller Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are no longer required because i am making use of the video handling within TheDisplay instead.
This has it's own m_videoStream and m_videoBuffer handling within itself.

The majority of the changes within this PR just handle the moving of the video handling out of LoadScreen.cpp and into TheDisplay instead. All of the tweaks to handle hiding the custom overlay and adding the user option are minor in comparisson.

I don't think it's entirely worth it's own PR for that, but i could move them into their own commits?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think m_videoStream, m_videoBuffer were not removed. They are now unused.

Separate Pull or Commit makes sense, because the video change is a refactor, nothing user facing, whereas the clock visuals change is user facing.

@Mauller Mauller force-pushed the Mauller/fix-overlays-during-video-playback branch from b12ed42 to 8a5e7fa Compare January 4, 2026 10:54
@xezon
Copy link

xezon commented Jan 6, 2026

How do we proceed here?

@Mauller
Copy link
Author

Mauller commented Jan 9, 2026

How do we proceed here?

Im going to change this pr into a refactor for the video handling.

Will split out the aspect ratio handling and overlay disabling into their own PRs.

Was a very hectic week so did not gave a chance to do anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gen Relates to Generals GUI For graphical user interface Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants