mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-12-02 22:18:09 +01:00
linux (compat): Add linux to most Win64 guards
This commit is contained in:
1 parent
8cf5675892
commit
9626065598
180 files changed
+941
-935
No files matched your search
@@ -6,7 +6,7 @@
|
||||
#include "../../../Minecraft.World/net.minecraft.world.inventory.h"
|
||||
#include "../../../Minecraft.World/net.minecraft.world.item.h"
|
||||
#include "../../MultiPlayerLocalPlayer.h"
|
||||
#ifdef _WINDOWS64
|
||||
#if defined(_WINDOWS64) || defined(__linux__)
|
||||
#include "../../Windows64/KeyboardMouseInput.h"
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@ void UIScene_AbstractContainerMenu::handleDestroy()
|
||||
{
|
||||
app.DebugPrintf("UIScene_AbstractContainerMenu::handleDestroy\n");
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
#if defined(_WINDOWS64) || defined(__linux__)
|
||||
g_KBMInput.SetScreenCursorHidden(false);
|
||||
g_KBMInput.SetCursorHiddenForUI(false);
|
||||
#endif
|
||||
@@ -53,7 +53,7 @@ void UIScene_AbstractContainerMenu::handleDestroy()
|
||||
}
|
||||
|
||||
// 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss.
|
||||
// We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying)
|
||||
// We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying)
|
||||
if(pMinecraft->localplayers[m_iPad] != nullptr && pMinecraft->localplayers[m_iPad]->containerMenu->containerId == m_menu->containerId)
|
||||
{
|
||||
pMinecraft->localplayers[m_iPad]->closeContainer();
|
||||
@@ -80,7 +80,7 @@ void UIScene_AbstractContainerMenu::InitDataAssociations(int iPad, AbstractConta
|
||||
|
||||
void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
#if defined(_WINDOWS64) || defined(__linux__)
|
||||
g_KBMInput.SetScreenCursorHidden(true);
|
||||
g_KBMInput.SetCursorHiddenForUI(true);
|
||||
#endif
|
||||
@@ -101,7 +101,7 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex)
|
||||
// We may have varying depths of controls here, so base off the pointers parent
|
||||
#if TO_BE_IMPLEMENTED
|
||||
HXUIOBJ parent;
|
||||
XuiElementGetBounds( m_pointerControl->m_hObj, &fPointerWidth, &fPointerHeight );
|
||||
XuiElementGetBounds( m_pointerControl->m_hObj, &fPointerWidth, &fPointerHeight );
|
||||
#else
|
||||
fPointerWidth = 50;
|
||||
fPointerHeight = 50;
|
||||
@@ -114,7 +114,7 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex)
|
||||
// Get size of pointer
|
||||
m_fPointerImageOffsetX = 0; //floor(fPointerWidth/2.0f);
|
||||
m_fPointerImageOffsetY = 0; //floor(fPointerHeight/2.0f);
|
||||
|
||||
|
||||
m_fPanelMinX = fPanelX;
|
||||
m_fPanelMaxX = fPanelX + fPanelWidth;
|
||||
m_fPanelMinY = fPanelY;
|
||||
@@ -122,9 +122,9 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex)
|
||||
|
||||
#ifdef __ORBIS__
|
||||
// we need to map the touchpad rectangle to the UI rectangle. While it works great for the creative menu, it is much too sensitive for the smaller menus.
|
||||
//X coordinate of the touch point (0 to 1919)
|
||||
//Y coordinate of the touch point (0 to 941: DUALSHOCK�4 wireless controllers and the CUH-ZCT1J/CAP-ZCT1J/CAP-ZCT1U controllers for the PlayStation�4 development tool,
|
||||
//0 to 753: JDX-1000x series controllers for the PlayStation�4 development tool,)
|
||||
//X coordinate of the touch point (0 to 1919)
|
||||
//Y coordinate of the touch point (0 to 941: DUALSHOCK�4 wireless controllers and the CUH-ZCT1J/CAP-ZCT1J/CAP-ZCT1U controllers for the PlayStation�4 development tool,
|
||||
//0 to 753: JDX-1000x series controllers for the PlayStation�4 development tool,)
|
||||
m_fTouchPadMulX=fPanelWidth/1919.0f;
|
||||
m_fTouchPadMulY=fPanelHeight/941.0f;
|
||||
m_fTouchPadDeadZoneX=15.0f*m_fTouchPadMulX;
|
||||
@@ -168,7 +168,7 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex)
|
||||
//m_pointerControl->SetPosition( &vPointerPos );
|
||||
m_pointerPos = vPointerPos;
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
#if defined(_WINDOWS64) || defined(__linux__)
|
||||
if ((iPad == 0) && g_KBMInput.IsKBMActive())
|
||||
{
|
||||
m_pointerPos.x = ((m_fPanelMinX + m_fPanelMaxX) * 0.5f) - m_fPointerImageOffsetX;
|
||||
@@ -286,7 +286,7 @@ void UIScene_AbstractContainerMenu::customDraw(IggyCustomDrawCallbackRegion *reg
|
||||
shared_ptr<ItemInstance> item = nullptr;
|
||||
int slotId = -1;
|
||||
if(wcscmp((wchar_t *)region->name,L"pointerIcon")==0)
|
||||
{
|
||||
{
|
||||
m_cacheSlotRenders = false;
|
||||
item = pMinecraft->localplayers[m_iPad]->inventory->getCarried();
|
||||
}
|
||||
@@ -298,7 +298,7 @@ void UIScene_AbstractContainerMenu::customDraw(IggyCustomDrawCallbackRegion *reg
|
||||
app.DebugPrintf("This is not the control we are looking for\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
m_cacheSlotRenders = true;
|
||||
Slot *slot = m_menu->getSlot(slotId);
|
||||
item = slot->getItem();
|
||||
|
||||
Reference in new issue
Block a user