From 257a1f7b339fb3f030250fb0466137fa8347ca9d Mon Sep 17 00:00:00 2001 From: NovaRain Date: Mon, 6 May 2024 23:38:23 +0800 Subject: [PATCH] Tweaked the check for stretch to fit of AVI movies --- sfall/Modules/Graphics.cpp | 2 +- sfall/Modules/Movies.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sfall/Modules/Graphics.cpp b/sfall/Modules/Graphics.cpp index b4e152ce..c78b2cba 100644 --- a/sfall/Modules/Graphics.cpp +++ b/sfall/Modules/Graphics.cpp @@ -476,7 +476,7 @@ void Graphics::SetMovieTexture(bool state) { subtitleShow = false; } else if (aviAspect < winAspect) { - if (Graphics::AviMovieWidthFit || (hrpIsEnabled && GetIntHRPValue(HRP_VAR_MOVIE_SIZE) == 2)) { + if (Graphics::AviMovieWidthFit) { //desc.Width = gWidth; // scales the movie surface to screen width } else { // scales width proportionally and places the movie surface at the center of the window along the X-axis diff --git a/sfall/Modules/Movies.cpp b/sfall/Modules/Movies.cpp index 58455af2..a2ad20a0 100644 --- a/sfall/Modules/Movies.cpp +++ b/sfall/Modules/Movies.cpp @@ -568,7 +568,10 @@ static __declspec(naked) void LostFocus() { bool Movies::DirectShowMovies() { int allowDShowMovies = IniReader::GetConfigInt("Graphics", "AllowDShowMovies", 0); if (allowDShowMovies > 0) { - Graphics::AviMovieWidthFit = (allowDShowMovies >= 2); + Graphics::AviMovieWidthFit = ( + allowDShowMovies >= 2 || + (hrpIsEnabled && IniReader::GetInt("MOVIES", "MOVIE_SIZE", 0, ".\\f2_res.ini") == 2) + ); MakeJump(0x44E690, gmovie_play_hack); HookCall(0x44E993, gmovie_play_hook_stop); /* NOTE: At this address 0x487781 (movieStart_), HRP by Mash changes the callback procedure to display mve frames. */