Add controller fixes for vc too
This commit is contained in:
parent
1fedaadc04
commit
60d2d90c46
10
.vscode/c_cpp_properties.json
vendored
10
.vscode/c_cpp_properties.json
vendored
@ -6,10 +6,10 @@
|
||||
"${workspaceFolder}/**",
|
||||
"${PLUGIN_SDK_DIR}/*",
|
||||
"${DIRECTX9_SDK_DIR}/Include/*",
|
||||
"${PLUGIN_SDK_DIR}/plugin_sa/*",
|
||||
"${PLUGIN_SDK_DIR}/plugin_sa/game_sa/*",
|
||||
// "${PLUGIN_SDK_DIR}/plugin_vc/*",
|
||||
// "${PLUGIN_SDK_DIR}/plugin_vc/game_vc/*",
|
||||
// "${PLUGIN_SDK_DIR}/plugin_sa/*",
|
||||
// "${PLUGIN_SDK_DIR}/plugin_sa/game_sa/*",
|
||||
"${PLUGIN_SDK_DIR}/plugin_vc/*",
|
||||
"${PLUGIN_SDK_DIR}/plugin_vc/game_vc/*",
|
||||
"${PLUGIN_SDK_DIR}/shared/*",
|
||||
"${PLUGIN_SDK_DIR}/shared/game/*",
|
||||
"C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt\\*",
|
||||
@ -20,7 +20,7 @@
|
||||
"IS_PLATFORM_WIN",
|
||||
"_CRT_SECURE_NO_WARNINGS",
|
||||
"_CRT_NON_CONFORMING_SWPRINTFS",
|
||||
"GTASA",
|
||||
"GTAVC",
|
||||
"_DX9_SDK_INSTALLED",
|
||||
"PLUGIN_SGV_10US"
|
||||
],
|
||||
|
18
src/hook.cpp
18
src/hook.cpp
@ -158,27 +158,31 @@ void Hook::ShowMouse(bool state)
|
||||
{
|
||||
|
||||
// Disable player controls for controllers
|
||||
#if GTASA
|
||||
bool bMouseDisabled = false;
|
||||
|
||||
if (patch::Get<BYTE>(0xBA6818) && (m_bShowMouse || bMouseDisabled))
|
||||
if (patch::Get<BYTE>(BY_GAME(0xBA6818, 0x86968B)) && (m_bShowMouse || bMouseDisabled))
|
||||
{
|
||||
|
||||
#ifdef GTASA
|
||||
CPlayerPed *player = FindPlayerPed();
|
||||
if (player && player->GetPadFromPlayer())
|
||||
CPad *pad = player ? player->GetPadFromPlayer() : NULL;
|
||||
#elif GTAVC
|
||||
CPad *pad = CPad::GetPad(0);
|
||||
#endif
|
||||
|
||||
if (pad)
|
||||
{
|
||||
if (m_bShowMouse)
|
||||
{
|
||||
bMouseDisabled = true;
|
||||
player->GetPadFromPlayer()->DisablePlayerControls = true;
|
||||
pad->DisablePlayerControls = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
bMouseDisabled = false;
|
||||
player->GetPadFromPlayer()->DisablePlayerControls = false;
|
||||
pad->DisablePlayerControls = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m_bMouseVisibility != m_bShowMouse)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user