Skip to content

Commit

Permalink
conviction: disable negative mouse acceleration
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Jul 29, 2024
1 parent d491fe2 commit 79a4609
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[MAIN]
SkipIntro = 1
WindowedMode = 0
DisableNegativeMouseAcceleration = 1
SkipSystemDetection = 1
PartialUltraWideSupport = 1
DisableDOF = 1
Expand Down
13 changes: 13 additions & 0 deletions source/SplinterCellConviction.FusionMod/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ void Init()
CIniReader iniReader("");
auto bSkipIntro = iniReader.ReadInteger("MAIN", "SkipIntro", 1) != 0;
auto bWindowedMode = iniReader.ReadInteger("MAIN", "WindowedMode", 0) != 0;
auto bDisableNegativeMouseAcceleration = iniReader.ReadInteger("MAIN", "DisableNegativeMouseAcceleration", 1) != 0;
auto bSkipSystemDetection = iniReader.ReadInteger("MAIN", "SkipSystemDetection", 1) != 0;
auto bPartialUltraWideSupport = iniReader.ReadInteger("MAIN", "PartialUltraWideSupport", 1) != 0;
bDisableBlackAndWhiteFilter = iniReader.ReadInteger("MAIN", "DisableBlackAndWhiteFilter", 0) != 0;
Expand Down Expand Up @@ -613,6 +614,18 @@ void Init()
});
}

if (bDisableNegativeMouseAcceleration)
{
auto pattern = hook::pattern("76 05 0F 28 D9 EB 08 0F 2F DA");
injector::MakeNOP(pattern.get_first(0), 2, true);
injector::MakeNOP(pattern.get_first(5), 2, true);
injector::MakeNOP(pattern.get_first(10), 2, true);

pattern = hook::pattern("77 0D 0F 2F C2 76 05 0F 28 CA EB 03 0F 28 C8 0F 57 C0");
injector::MakeNOP(pattern.get_first(0), 2, true);
injector::MakeNOP(pattern.get_first(5), 2, true);
}

if (bSkipIntro)
{
auto pattern = hook::pattern("55 8D 6C 24 88 81 EC ? ? ? ? A1 ? ? ? ? 33 C5 89 45 74 53 56 57 BE ? ? ? ? 68 ? ? ? ? 8B CE E8 ? ? ? ? E8 ? ? ? ? 50");
Expand Down

0 comments on commit 79a4609

Please sign in to comment.