Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*.sln.docstates
*.lnk
.obsidian/*
mgs2_live_dump.bin

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
Expand Down Expand Up @@ -362,4 +363,4 @@ MigrationBackup/
.ionide/

# Fody - auto-generated XML schema
FodyWeavers.xsd
FodyWeavers.xsd
6 changes: 6 additions & 0 deletions ConfigTool/tab_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ std::nullopt, false, Field::Int, 100, 1, 100},
{ ConfigKeys::FixOpticalCamo_Section, ConfigKeys::FixOpticalCamo_Setting, ConfigKeys::FixOpticalCamo_Help, ConfigKeys::FixOpticalCamo_Tooltip,
std::nullopt, false, Field::Bool, true },

{ ConfigKeys::FixMGS2DepthOfField_Section, ConfigKeys::FixMGS2DepthOfField_Setting, ConfigKeys::FixMGS2DepthOfField_Help, ConfigKeys::FixMGS2DepthOfField_Tooltip,
std::nullopt, false, Field::Bool, true },

{ ConfigKeys::MGS2DepthOfFieldBlurUvMultiplier_Section, ConfigKeys::MGS2DepthOfFieldBlurUvMultiplier_Setting, ConfigKeys::MGS2DepthOfFieldBlurUvMultiplier_Help, ConfigKeys::MGS2DepthOfFieldBlurUvMultiplier_Tooltip,
std::make_pair(ConfigKeys::FixMGS2DepthOfField_Section, ConfigKeys::FixMGS2DepthOfField_Setting), false, Field::Float, 0, 0, 0, "", {}, 6.0, 0.0, 20.0 },

{ ConfigKeys::RestoreDogtagNames_Section, ConfigKeys::RestoreDogtagNames_Setting, ConfigKeys::RestoreDogtagNames_Help, ConfigKeys::RestoreDogtagNames_Tooltip,
std::nullopt, false, Field::Bool, true },

Expand Down
2 changes: 1 addition & 1 deletion src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,14 +501,14 @@ static void InitializeSubsystems()
INITIALIZE(MGS2_Kirari_Sun2Fix::ApplyFix());
INITIALIZE(MGS2_RestoreDogtagViewer::Restore());
INITIALIZE(MGS3FixCameraOffset::Activate());
INITIALIZE(g_DepthOfFieldFixes.Initialize());


#if !defined(RELEASE_BUILD) //todo category

INITIALIZE(CutscenePausing::Setup());

//todo: Make ultrawide & 4:3 reposition HUD elements correctly instead of stretching them
//INITIALIZE(g_DepthOfFieldFixes.Initialize());
//INITIALIZE(MGS2ColorFilterFix::Initialize());
//INITIALIZE(GammaCorrection::Initialize());
//INITIALIZE(MGS3FixHolster::Initialize());
Expand Down
17 changes: 6 additions & 11 deletions src/features/custom_resolution_and_borderless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1030,19 +1030,14 @@ namespace CustomResolutionAndBorderless
spdlog::error("MGS 2: Codec Portraits: Pattern scan failed.");
}

// MGS 2: Disable motion blur.
uint8_t* MGS2_MotionBlurScanResult = Memory::PatternScanSilent(baseModule, "F3 48 ?? ?? ?? ?? 48 ?? ?? ?? 48 ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 0F ?? ??");
if (MGS2_MotionBlurScanResult)
if (fAspectRatio > fNativeAspect)
{
spdlog::info("MGS 2: Motion Blur: Address is {:s}+{:X}", sExeName.c_str(), (uintptr_t)MGS2_MotionBlurScanResult - (uintptr_t)baseModule);

Memory::PatchBytes((uintptr_t)MGS2_MotionBlurScanResult, "\x48\x31\xDB\x90\x90\x90", 6);
spdlog::info("MGS 2: Motion Blur: Patched instruction.");
}
else if (!MGS2_MotionBlurScanResult)
{
spdlog::error("MGS 2: Motion Blur: Pattern scan failed.");
if (uint8_t* MGS2_MotionBlurScanResult = Memory::PatternScanSilent(baseModule, "F3 48 ?? ?? ?? ?? 48 ?? ?? ?? 48 ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 0F ?? ??"))
{
Memory::PatchBytes((uintptr_t)MGS2_MotionBlurScanResult, "\x48\x31\xDB\x90\x90\x90", 6);
}
}

}
else if (eGameType & MGS3 && bHUDFix || eGameType & MG && fAspectRatio != fNativeAspect)
{
Expand Down
Loading
Loading