linux (compat): Add linux to most Win64 guards

This commit is contained in:
Anaël committed 2026-11-29 13:33:39 +01:00
1 parent 8cf5675892
commit 9626065598
180 files changed
+941 -935

No files matched your search

+6 -6
View File
@@ -7,7 +7,7 @@
#include "Input.h"
#include "../Minecraft.Client/LocalPlayer.h"
#include "Options.h"
#ifdef _WINDOWS64
#if defined(_WINDOWS64) || defined(__linux__)
#include "Windows64/KeyboardMouseInput.h"
#endif
@@ -45,7 +45,7 @@ void Input::tick(LocalPlayer *player)
float kbXA = 0.0f;
float kbYA = 0.0f;
#ifdef _WINDOWS64
#if defined(_WINDOWS64) || defined(__linux__)
if (iPad == 0 && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive())
{
if( pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_LEFT) || pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_RIGHT) )
@@ -92,7 +92,7 @@ void Input::tick(LocalPlayer *player)
}
}
#ifdef _WINDOWS64
#if defined(_WINDOWS64) || defined(__linux__)
if (iPad == 0 && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive())
{
// Left Shift = sneak (hold to crouch)
@@ -173,7 +173,7 @@ void Input::tick(LocalPlayer *player)
float turnX = tx * abs(tx) * turnSpeed;
float turnY = ty * abs(ty) * turnSpeed;
#ifdef _WINDOWS64
#if defined(_WINDOWS64) || defined(__linux__)
if (iPad == 0 && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive())
{
float mouseSensitivity = static_cast<float>(app.GetGameSettings(iPad, eGameSetting_Sensitivity_InGame)) / 100.0f;
@@ -197,7 +197,7 @@ void Input::tick(LocalPlayer *player)
unsigned int jump = InputManager.GetValue(iPad, MINECRAFT_ACTION_JUMP);
bool kbJump = false;
#ifdef _WINDOWS64
#if defined(_WINDOWS64) || defined(__linux__)
kbJump = (iPad == 0) && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive() && g_KBMInput.IsBindDown(KeyboardMouseInput::KB_JUMP);
#endif
if( (jump > 0 || kbJump) && pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_JUMP) )
@@ -209,7 +209,7 @@ void Input::tick(LocalPlayer *player)
if (app.GetFreezePlayers()) jumping = false;
#endif
#ifdef _WINDOWS64
#if defined(_WINDOWS64) || defined(__linux__)
if (iPad == 0 && g_KBMInput.IsKeyPressed(VK_ESCAPE) && g_KBMInput.IsMouseGrabbed())
{
g_KBMInput.SetMouseGrabbed(false);