-
Notifications
You must be signed in to change notification settings - Fork 141
Tweak(Gui): Hide the custom overlay during video playback and add the ability to correctly scale campaign videos #2053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
902fe9f to
b12ed42
Compare
|
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()) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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.
GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp
Outdated
Show resolved
Hide resolved
| */ | ||
| m_ambientLoop.setEventName("LoadScreenAmbient"); | ||
| // create the new stream | ||
| m_videoStream = TheVideoPlayer->open( TheCampaignManager->getCurrentMission()->m_movieLabel ); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
b12ed42 to
8a5e7fa
Compare
|
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. |
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