Fix but with radio scroll #45 & config save
This commit is contained in:
parent
adf52ae50c
commit
86286d63d6
@ -86,7 +86,11 @@ CheatMenu::CheatMenu()
|
|||||||
|
|
||||||
Events::drawMenuBackgroundEvent += [this]
|
Events::drawMenuBackgroundEvent += [this]
|
||||||
{
|
{
|
||||||
|
if (Hook::show_mouse)
|
||||||
|
{
|
||||||
|
config.WriteToDisk();
|
||||||
Hook::show_mouse = false;
|
Hook::show_mouse = false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Events::shutdownRwEvent += []
|
Events::shutdownRwEvent += []
|
||||||
|
@ -12,7 +12,7 @@ bool Hook::show_mouse = false;
|
|||||||
|
|
||||||
std::function<void()> Hook::window_func = NULL;
|
std::function<void()> Hook::window_func = NULL;
|
||||||
|
|
||||||
LRESULT Hook::InputProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
LRESULT Hook::WndProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam);
|
ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam);
|
||||||
|
|
||||||
@ -20,6 +20,9 @@ LRESULT Hook::InputProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||||||
{
|
{
|
||||||
patch::Nop(0x4EB9F4, 5); // disable radio scroll
|
patch::Nop(0x4EB9F4, 5); // disable radio scroll
|
||||||
Call<0x541BD0>(); // CPad::ClearMouseHistory
|
Call<0x541BD0>(); // CPad::ClearMouseHistory
|
||||||
|
|
||||||
|
if (uMsg == WM_MOUSEWHEEL)
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
patch::SetRaw(0x4EB9F4, (void*)"\xE8\x67\xFC\xFF\xFF", 5); // enable radio scroll
|
patch::SetRaw(0x4EB9F4, (void*)"\xE8\x67\xFC\xFF\xFF", 5); // enable radio scroll
|
||||||
@ -29,7 +32,7 @@ LRESULT Hook::InputProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||||||
Call<0x53F1E0>(); // CPad::ClearKeyboardHistory
|
Call<0x53F1E0>(); // CPad::ClearKeyboardHistory
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return CallWindowProc(oWndProc, hWnd, uMsg, wParam, lParam);
|
return CallWindowProc(oWndProc, hWnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +120,7 @@ void Hook::Present(void *ptr)
|
|||||||
io.LogFilename = NULL;
|
io.LogFilename = NULL;
|
||||||
|
|
||||||
style.WindowTitleAlign = ImVec2(0.5, 0.5);
|
style.WindowTitleAlign = ImVec2(0.5, 0.5);
|
||||||
oWndProc = (WNDPROC)SetWindowLongPtr(RsGlobal.ps->window, GWL_WNDPROC, (LRESULT)InputProc);
|
oWndProc = (WNDPROC)SetWindowLongPtr(RsGlobal.ps->window, GWL_WNDPROC, (LRESULT)WndProc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ private:
|
|||||||
static HRESULT CALLBACK PresentDx9Handler(IDirect3DDevice9 *pDevice, RECT* pSourceRect, RECT* pDestRect, HWND hDestWindowOverride, RGNDATA* pDirtyRegion);
|
static HRESULT CALLBACK PresentDx9Handler(IDirect3DDevice9 *pDevice, RECT* pSourceRect, RECT* pDestRect, HWND hDestWindowOverride, RGNDATA* pDirtyRegion);
|
||||||
static HRESULT CALLBACK PresentDx11Handler(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags);
|
static HRESULT CALLBACK PresentDx11Handler(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags);
|
||||||
static HRESULT CALLBACK Reset(IDirect3DDevice9 * pDevice, D3DPRESENT_PARAMETERS * pPresentationParameters);
|
static HRESULT CALLBACK Reset(IDirect3DDevice9 * pDevice, D3DPRESENT_PARAMETERS * pPresentationParameters);
|
||||||
static LRESULT CALLBACK InputProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
static LRESULT CALLBACK WndProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
static void ShowMouse(bool state);
|
static void ShowMouse(bool state);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
Reference in New Issue
Block a user