diff --git a/mc2hook/mc2hook/handlers/ControllerScrollingFixHandler.cpp b/mc2hook/mc2hook/handlers/ControllerScrollingFixHandler.cpp new file mode 100644 index 0000000..d788580 --- /dev/null +++ b/mc2hook/mc2hook/handlers/ControllerScrollingFixHandler.cpp @@ -0,0 +1,11 @@ +#include "ControllerScrollingFixHandler.h" + +void ControllerScrollingFixHandler::Install() +{ + bool enableMenuScrollFix = HookConfig::GetBool("Experimental", "MenuScrollFix", true); + if (enableMenuScrollFix) + { + // Fixes controller scrolling bug in the menu + mem::write(0x603EBA, 0x90E9); + } +} \ No newline at end of file diff --git a/mc2hook/mc2hook/handlers/ControllerScrollingFixHandler.h b/mc2hook/mc2hook/handlers/ControllerScrollingFixHandler.h new file mode 100644 index 0000000..485c581 --- /dev/null +++ b/mc2hook/mc2hook/handlers/ControllerScrollingFixHandler.h @@ -0,0 +1,8 @@ +#pragma once +#include + +class ControllerScrollingFixHandler +{ +public: + static void Install(); +}; \ No newline at end of file diff --git a/mc2hook/mc2hook/handlers/handlers.h b/mc2hook/mc2hook/handlers/handlers.h index ea7a661..657783e 100644 --- a/mc2hook/mc2hook/handlers/handlers.h +++ b/mc2hook/mc2hook/handlers/handlers.h @@ -17,6 +17,7 @@ #include #include #include +#include #include @@ -50,6 +51,7 @@ static void InstallMainHandlers() InstallHandler("Chat Handler"); InstallHandler("Game Init Handler"); InstallHandler("Reflection Fidelity Handller"); + InstallHandler("Controller Scrolling Fix"); InstallHandler("SRH"); } \ No newline at end of file diff --git a/mc2hook/mc2hook/mc2hook.vcxproj b/mc2hook/mc2hook/mc2hook.vcxproj index 056702b..0fd255d 100644 --- a/mc2hook/mc2hook/mc2hook.vcxproj +++ b/mc2hook/mc2hook/mc2hook.vcxproj @@ -189,6 +189,7 @@ + @@ -242,6 +243,7 @@ + diff --git a/mc2hook/mc2hook/mc2hook.vcxproj.filters b/mc2hook/mc2hook/mc2hook.vcxproj.filters index 027b650..484d9fb 100644 --- a/mc2hook/mc2hook/mc2hook.vcxproj.filters +++ b/mc2hook/mc2hook/mc2hook.vcxproj.filters @@ -219,6 +219,9 @@ Header Files + + Header Files + @@ -341,5 +344,8 @@ Source Files + + Source Files + \ No newline at end of file