diff --git a/Minecraft.Client/Common/Console_Utils.cpp b/Minecraft.Client/Common/Console_Utils.cpp index cb0f1b583..dcd2f0f36 100644 --- a/Minecraft.Client/Common/Console_Utils.cpp +++ b/Minecraft.Client/Common/Console_Utils.cpp @@ -1,5 +1,7 @@ #include "stdafx.h" +#define CDECL + //-------------------------------------------------------------------------------------- // Name: DebugSpewV() // Desc: Internal helper function @@ -7,7 +9,7 @@ #ifndef _CONTENT_PACKAGE static VOID DebugSpewV( const CHAR* strFormat, const va_list pArgList ) { -#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ +#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ || defined(__linux__) assert(0); #else CHAR str[2048]; diff --git a/Minecraft.Client/Common/UI/UIController.h b/Minecraft.Client/Common/UI/UIController.h index ef064f80c..e1f7cba45 100644 --- a/Minecraft.Client/Common/UI/UIController.h +++ b/Minecraft.Client/Common/UI/UIController.h @@ -11,6 +11,27 @@ 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 16f627218..80b65be0f 100644 --- a/Minecraft.Client/Linux/LinuxStubs.h +++ b/Minecraft.Client/Linux/LinuxStubs.h @@ -190,6 +190,8 @@ typedef struct _SYSTEMTIME { } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME; #define TLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF) +// https://learn.microsoft.com/en-us/cpp/c-runtime-library/truncate?view=msvc-170 +#define _TRUNCATE ((size_t)-1) typedef pthread_mutex_t RTL_CRITICAL_SECTION; typedef pthread_mutex_t* PRTL_CRITICAL_SECTION;