mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-05-11 22:29:30 +03:00
vrclient: Build with long types.
This commit is contained in:
parent
3dab466a9a
commit
d9c38daa27
@ -7,7 +7,7 @@ x86_64_UNIXLIB = vrclient_x64.so
|
||||
aarch64_MODULE = vrclient_x64.dll
|
||||
aarch64_UNIXLIB = vrclient_x64.so
|
||||
|
||||
EXTRADEFS = -DWINE_NO_LONG_TYPES -DGNUC
|
||||
EXTRADEFS = -DGNUC
|
||||
|
||||
SOURCES = \
|
||||
flatapi.c \
|
||||
|
@ -31,7 +31,7 @@ static char *get_unix_file_name( const WCHAR *path )
|
||||
{
|
||||
UNICODE_STRING nt_name;
|
||||
OBJECT_ATTRIBUTES attr;
|
||||
NTSTATUS status;
|
||||
UINT status;
|
||||
ULONG size = 256;
|
||||
char *buffer;
|
||||
|
||||
@ -126,7 +126,7 @@ void vrclient_free_path( char *path )
|
||||
/* returns the number of bytes written to dst, not including the NUL terminator */
|
||||
unsigned int vrclient_unix_path_to_dos_path( bool api_result, const char *src, char *dst, uint32_t dst_bytes )
|
||||
{
|
||||
NTSTATUS status;
|
||||
UINT status;
|
||||
uint32_t r = 0;
|
||||
ULONG size = 0;
|
||||
WCHAR *dosW;
|
||||
|
@ -198,7 +198,7 @@ NTSTATUS vrclient_init_registry( void *args )
|
||||
HMODULE hwineopenxr;
|
||||
void *lib_vrclient;
|
||||
void *unix_handle;
|
||||
DWORD hmd_present;
|
||||
UINT hmd_present;
|
||||
int return_code;
|
||||
unsigned int i;
|
||||
VkResult res;
|
||||
|
@ -33,7 +33,7 @@ static BOOL vrclient_loaded;
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
|
||||
{
|
||||
TRACE("(%p, %u, %p)\n", instance, reason, reserved);
|
||||
TRACE("(%p, %lu, %p)\n", instance, reason, reserved);
|
||||
|
||||
switch (reason)
|
||||
{
|
||||
@ -130,20 +130,20 @@ static int load_vrclient(void)
|
||||
|
||||
if ((status = RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Wine\\VR", 0, KEY_READ, &vr_key)))
|
||||
{
|
||||
WINE_WARN("Could not create key, status %#x.\n", status);
|
||||
WINE_WARN("Could not create key, status %#lx.\n", status);
|
||||
return 0;
|
||||
}
|
||||
|
||||
size = sizeof(pathW);
|
||||
if ((status = RegQueryValueExW(vr_key, L"PROTON_VR_RUNTIME", NULL, &type, (BYTE *)pathW, &size)))
|
||||
{
|
||||
WINE_WARN("Could not query value, status %#x.\n", status);
|
||||
WINE_WARN("Could not query value, status %#lx.\n", status);
|
||||
RegCloseKey(vr_key);
|
||||
return 0;
|
||||
}
|
||||
if (type != REG_SZ)
|
||||
{
|
||||
WINE_ERR("Unexpected value type %#x.\n", type);
|
||||
WINE_ERR("Unexpected value type %#lx.\n", type);
|
||||
RegCloseKey(vr_key);
|
||||
return 0;
|
||||
}
|
||||
@ -202,7 +202,7 @@ static BOOL set_vr_status( HKEY key, DWORD value )
|
||||
|
||||
if ((status = RegSetValueExW( key, L"state", 0, REG_DWORD, (BYTE *)&value, sizeof(value) )))
|
||||
{
|
||||
ERR( "Could not set state value, status %#x.\n", status );
|
||||
ERR( "Could not set state value, status %#lx.\n", status );
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
@ -226,7 +226,7 @@ static DWORD WINAPI initialize_vr_data( void *arg )
|
||||
else
|
||||
{
|
||||
if (!(openxr = LoadLibraryW( L"wineopenxr" )))
|
||||
WARN( "Could not load wineopenxr, err %u.\n", GetLastError() );
|
||||
WARN( "Could not load wineopenxr, err %lu.\n", GetLastError() );
|
||||
else
|
||||
{
|
||||
BOOL (CDECL * init)(void);
|
||||
@ -257,7 +257,7 @@ BOOL CDECL vrclient_init_registry(void)
|
||||
if ((status = RegCreateKeyExW( HKEY_CURRENT_USER, L"Software\\Wine\\VR", 0, NULL,
|
||||
REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &vr_key, &disp )))
|
||||
{
|
||||
ERR( "Could not create key, status %#x.\n", status );
|
||||
ERR( "Could not create key, status %#lx.\n", status );
|
||||
return FALSE;
|
||||
}
|
||||
if (disp != REG_CREATED_NEW_KEY)
|
||||
@ -272,7 +272,7 @@ BOOL CDECL vrclient_init_registry(void)
|
||||
if ((status = RegSetValueExW( vr_key, L"PROTON_VR_RUNTIME", 0, REG_SZ, (BYTE *)pathW,
|
||||
(wcslen( pathW ) + 1) * sizeof(*pathW) )))
|
||||
{
|
||||
ERR( "Could not set PROTON_VR_RUNTIME value, status %#x.\n", status );
|
||||
ERR( "Could not set PROTON_VR_RUNTIME value, status %#lx.\n", status );
|
||||
set_vr_status( vr_key, -1 );
|
||||
RegCloseKey( vr_key );
|
||||
return FALSE;
|
||||
@ -303,7 +303,7 @@ BOOL CDECL vrclient_init_registry(void)
|
||||
GetModuleHandleExA( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (void *)initialize_vr_data, &vrclient );
|
||||
if (!(thread = CreateThread( NULL, 0, initialize_vr_data, vr_key, 0, NULL )))
|
||||
{
|
||||
WINE_ERR( "Could not create thread, error %u.\n", GetLastError() );
|
||||
WINE_ERR( "Could not create thread, error %lu.\n", GetLastError() );
|
||||
FreeLibrary( vrclient );
|
||||
RegCloseKey( vr_key );
|
||||
return FALSE;
|
||||
@ -342,20 +342,20 @@ static int8_t is_hmd_present_reg(void)
|
||||
|
||||
if ((status = RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Wine\\VR", 0, KEY_READ, &vr_key)))
|
||||
{
|
||||
WINE_ERR("Could not create key, status %#x.\n", status);
|
||||
WINE_ERR("Could not create key, status %#lx.\n", status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
size = sizeof(value);
|
||||
if ((status = RegQueryValueExW(vr_key, L"state", NULL, &type, (BYTE *)&value, &size)))
|
||||
{
|
||||
WINE_ERR("Could not query value, status %#x.\n", status);
|
||||
WINE_ERR("Could not query value, status %#lx.\n", status);
|
||||
RegCloseKey(vr_key);
|
||||
return FALSE;
|
||||
}
|
||||
if (type != REG_DWORD)
|
||||
{
|
||||
WINE_ERR("Unexpected value type %#x.\n", type);
|
||||
WINE_ERR("Unexpected value type %#lx.\n", type);
|
||||
RegCloseKey(vr_key);
|
||||
return FALSE;
|
||||
}
|
||||
@ -377,7 +377,7 @@ static int8_t is_hmd_present_reg(void)
|
||||
size = sizeof(value);
|
||||
if ((status = RegQueryValueExW(vr_key, L"state", NULL, &type, (BYTE *)&value, &size)))
|
||||
{
|
||||
WINE_ERR("Could not query value, status %#x.\n", status);
|
||||
WINE_ERR("Could not query value, status %#lx.\n", status);
|
||||
goto done;
|
||||
}
|
||||
if (value)
|
||||
@ -387,7 +387,7 @@ static int8_t is_hmd_present_reg(void)
|
||||
|
||||
if (wait_status != WAIT_OBJECT_0)
|
||||
{
|
||||
WINE_ERR("Got unexpected wait status %#x.\n", wait_status);
|
||||
WINE_ERR("Got unexpected wait status %#lx.\n", wait_status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -397,7 +397,7 @@ static int8_t is_hmd_present_reg(void)
|
||||
|
||||
size = sizeof(is_hmd_present);
|
||||
if ((status = RegQueryValueExW(vr_key, L"is_hmd_present", NULL, &type, (BYTE *)&is_hmd_present, &size)))
|
||||
WINE_ERR("Could not query is_hmd_present value, status %#x.\n", status);
|
||||
WINE_ERR("Could not query is_hmd_present value, status %#lx.\n", status);
|
||||
|
||||
done:
|
||||
CloseHandle(event);
|
||||
|
@ -76,7 +76,7 @@ static uint32_t ivrrendermodels_load_texture_d3d11_async( void *device, w_Render
|
||||
hr = d3d11_device->lpVtbl->CreateTexture2D( d3d11_device, &desc, NULL, &texture );
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN( "Failed to create D3D11 texture %#x\n", hr );
|
||||
WARN( "Failed to create D3D11 texture %#lx\n", hr );
|
||||
return VRRenderModelError_InvalidTexture;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user