From 39b9222ba1132987f413452b92ccb9843e71f68a Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Tue, 3 Mar 2026 11:58:59 -0600 Subject: [PATCH] refactor: reorganize d3d stubs --- Minecraft.Client/Common/UI/UIController.h | 21 --------------------- Minecraft.Client/Linux/LinuxStubs.h | 23 +++++++++++++++++++++++ Minecraft.Client/stdafx.h | 2 +- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/Minecraft.Client/Common/UI/UIController.h b/Minecraft.Client/Common/UI/UIController.h index e1f7cba45..ef064f80c 100644 --- a/Minecraft.Client/Common/UI/UIController.h +++ b/Minecraft.Client/Common/UI/UIController.h @@ -11,27 +11,6 @@ class UIComponent_DebugUIConsole; class UIComponent_DebugUIMarketingGuide; class UIControl; -#if defined(__linux__) -typedef struct _RECT -{ - LONG left; - LONG top; - LONG right; - LONG bottom; -} RECT, *PRECT; - -// stole- i mean borrowed from OrbisStubs.h -typedef void ID3D11Device; -typedef void ID3D11DeviceContext; -typedef void IDXGISwapChain; -typedef RECT D3D11_RECT; -typedef void ID3D11RenderTargetView; -typedef void ID3D11DepthStencilView; -typedef void ID3D11Buffer; -typedef DWORD (*PTHREAD_START_ROUTINE)( LPVOID lpThreadParameter); -typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE; -#endif // __linux__ - // Base class for all shared functions between UIControllers class UIController : public IUIController { diff --git a/Minecraft.Client/Linux/LinuxStubs.h b/Minecraft.Client/Linux/LinuxStubs.h index 910dd9830..a48fba33d 100644 --- a/Minecraft.Client/Linux/LinuxStubs.h +++ b/Minecraft.Client/Linux/LinuxStubs.h @@ -28,6 +28,7 @@ #define ZeroMemory RtlZeroMemory #define WINAPI +#define __cdecl #define _vsnprintf_s vsnprintf; typedef unsigned int DWORD; @@ -697,6 +698,28 @@ HANDLE CreateEvent(int manual_reset, int initial_state) { return (HANDLE)ev; } +// d3d11 stubs + +typedef struct _RECT +{ + LONG left; + LONG top; + LONG right; + LONG bottom; +} RECT, *PRECT; + +// stole- i mean borrowed from OrbisStubs.h +typedef void ID3D11Device; +typedef void ID3D11DeviceContext; +typedef void ID3D11ShaderResourceView; // used only by windows/durango gdraw and uicontroller +typedef void IDXGISwapChain; +typedef RECT D3D11_RECT; +typedef void ID3D11RenderTargetView; +typedef void ID3D11DepthStencilView; +typedef void ID3D11Buffer; +typedef DWORD (*PTHREAD_START_ROUTINE)( LPVOID lpThreadParameter); +typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE; + //typedef bool rrbool; #define S_OK 0 diff --git a/Minecraft.Client/stdafx.h b/Minecraft.Client/stdafx.h index ee5f2ce5c..57e262265 100644 --- a/Minecraft.Client/stdafx.h +++ b/Minecraft.Client/stdafx.h @@ -308,7 +308,7 @@ typedef XUID GameSessionUID; // DecalOverdose: DONT (according to localcc) #include "Linux/iggy_stub.h" //#include "Windows64/Iggy/include/iggy.h" - //#include "Windows64/Iggy/gdraw/gdraw_d3d11.h" + #include "Windows64/Iggy/gdraw/gdraw_d3d11.h" #include "Windows64/Windows64_UIController.h" #elif defined __PSVITA__ #include "PSVita/PSVita_App.h"