Fix crash on linux with proton

This commit is contained in:
2026-02-22 22:22:42 -05:00
parent 1056301981
commit 4312ecd172
2 changed files with 14 additions and 10 deletions

View File

@@ -3,6 +3,8 @@
#include <Core/HAL/OS/OS.h> #include <Core/HAL/OS/OS.h>
#include <Core/HAL/OS/OS_Private.h> #include <Core/HAL/OS/OS_Private.h>
#include <Core/HAL/Win32.h> #include <Core/HAL/Win32.h>
#include <Core/Logging/LogManager.h>
#include <Core/Logging/LogTypes.h>
namespace Juliet namespace Juliet
{ {
@@ -25,8 +27,12 @@ namespace Juliet
Assert(size <= static_cast<size_t>(MaxValueOf<DWORD>())); Assert(size <= static_cast<size_t>(MaxValueOf<DWORD>()));
if (w32_rio_functions.RIORegisterBuffer != nullptr && w32_rio_functions.RIODeregisterBuffer != nullptr)
{
w32_rio_functions.RIODeregisterBuffer( w32_rio_functions.RIODeregisterBuffer(
w32_rio_functions.RIORegisterBuffer(reinterpret_cast<PCHAR>(ptr), static_cast<DWORD>(size))); w32_rio_functions.RIORegisterBuffer(reinterpret_cast<PCHAR>(ptr), static_cast<DWORD>(size)));
}
return result; return result;
} }
@@ -81,8 +87,12 @@ namespace Juliet
GUID guid = WSAID_MULTIPLE_RIO; GUID guid = WSAID_MULTIPLE_RIO;
DWORD rio_byte = 0; DWORD rio_byte = 0;
SOCKET Sock = socket(AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP); SOCKET Sock = socket(AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP);
WSAIoctl(Sock, SIO_GET_MULTIPLE_EXTENSION_FUNCTION_POINTER, &guid, sizeof(guid), int result = WSAIoctl(Sock, SIO_GET_MULTIPLE_EXTENSION_FUNCTION_POINTER, &guid, sizeof(guid),
(void**)&w32_rio_functions, sizeof(w32_rio_functions), &rio_byte, nullptr, nullptr); (void**)&w32_rio_functions, sizeof(w32_rio_functions), &rio_byte, nullptr, nullptr);
if (result != 0)
{
LogError(LogCategory::Core, "Couldnt get w32 RIO Functions. Error code %d", result);
}
closesocket(Sock); closesocket(Sock);
} }

View File

@@ -23,12 +23,6 @@
#define D3D12_CREATEDEVICE_FUNC "D3D12CreateDevice" #define D3D12_CREATEDEVICE_FUNC "D3D12CreateDevice"
#define D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE_FUNC "D3D12SerializeVersionedRootSignature" #define D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE_FUNC "D3D12SerializeVersionedRootSignature"
extern "C" {
// Used to enable the "Agility SDK" components
__declspec(dllexport) extern const unsigned int D3D12SDKVersion = 615;
__declspec(dllexport) extern const char* D3D12SDKPath = ".\\D3D12\\";
}
// TODO : Use LoadLibrary and not link to the lib. Allows failing earlier if Dx12 is not installed for some reason // TODO : Use LoadLibrary and not link to the lib. Allows failing earlier if Dx12 is not installed for some reason
// + Will load the dll when needed // + Will load the dll when needed
// This will prevent us from using IID_ variables as they are defined in dxguid.lib // This will prevent us from using IID_ variables as they are defined in dxguid.lib