gurrgur / er-patcher

Elden Ring enhancement patches (ultrawide support, custom frame rate limits and more) seamlessly integrated with steam.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Camera fix.

cmhamiche opened this issue · comments

commented

May I kindly ask you to implement the camera fix, please.
Here's some examples:

EldenRingMods:
https://raw.githubusercontent.com/techiew/EldenRingMods/master/CameraFix/DllMain.cpp

DWORD WINAPI MainThread(LPVOID lpParam)
{
	Log("Activating camera fix...");
	std::vector<uint16_t> originalBytes = { 0x0f, 0x29, 0xa6, MASKED, MASKED, MASKED, MASKED, 0x41, 0x0f, 0x28, 0xcf, 0x48, 0x8b, 0xce };
	std::vector<uint8_t> newBytes(7, 0x90);
	uintptr_t patchAddress = SigScan(originalBytes);
	if (patchAddress != 0)
	{
		Replace(patchAddress, originalBytes, newBytes);
	}
	CloseLog();
	return 0;
}

EldenRingFpsUnlockAndMore:
https://raw.githubusercontent.com/uberhalit/EldenRingFpsUnlockAndMore/2df0d2bf68d0becc8a09eee0700a186eef0fbb8e/EldenRingFPSUnlockAndMore/GameData.cs

internal const string PATTERN_CAMERA_ROTATION = "0f 29 a6 ?? ?? ?? ?? 41 0f 28 cf";
        internal const int PATTERN_CAMERA_ROTATION_OFFSET = 0;
        internal const int PATCH_CAMERA_ROTATION_INSTRUCTION_LENGTH = 7;
        internal static readonly byte[] PATCH_CAMERA_ROTATION_ENABLE = new byte[] { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }; // nop

That'd be great!

Hey, can you test if this modified version of the patcher works? The option for it is called --fix-camera.

commented

That was quick, let me test this. I'll come back to you.
Yup, works fine. Much appreciated.

Thanks for testing. Just pushed the changes, so I'll be closing this.