Fix crash on linux with proton
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
#include <Core/HAL/OS/OS.h>
|
||||
#include <Core/HAL/OS/OS_Private.h>
|
||||
#include <Core/HAL/Win32.h>
|
||||
#include <Core/Logging/LogManager.h>
|
||||
#include <Core/Logging/LogTypes.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
@@ -25,8 +27,12 @@ namespace Juliet
|
||||
|
||||
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.RIORegisterBuffer(reinterpret_cast<PCHAR>(ptr), static_cast<DWORD>(size)));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -81,8 +87,12 @@ namespace Juliet
|
||||
GUID guid = WSAID_MULTIPLE_RIO;
|
||||
DWORD rio_byte = 0;
|
||||
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);
|
||||
if (result != 0)
|
||||
{
|
||||
LogError(LogCategory::Core, "Couldnt get w32 RIO Functions. Error code %d", result);
|
||||
}
|
||||
closesocket(Sock);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,12 +23,6 @@
|
||||
#define D3D12_CREATEDEVICE_FUNC "D3D12CreateDevice"
|
||||
#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
|
||||
// + Will load the dll when needed
|
||||
// This will prevent us from using IID_ variables as they are defined in dxguid.lib
|
||||
|
||||
Reference in New Issue
Block a user