MSVC2017 Non-UWP buildfixes
This commit is contained in:
parent
8f67cf7384
commit
dd60b5d576
|
@ -1266,33 +1266,27 @@ inline HRESULT XAudio2Create(_Outptr_ IXAudio2** ppXAudio2,
|
|||
typedef HRESULT(__stdcall *XAudio2CreateWithVersionInfoFunc)(_Outptr_ IXAudio2**, UINT32, XAUDIO2_PROCESSOR, DWORD);
|
||||
typedef HRESULT(__stdcall *XAudio2CreateInfoFunc)(_Outptr_ IXAudio2**, UINT32, XAUDIO2_PROCESSOR);
|
||||
|
||||
static HMODULE s_dllInstance = nullptr;
|
||||
static XAudio2CreateWithVersionInfoFunc s_pfnAudio2CreateWithVersion = nullptr;
|
||||
static XAudio2CreateInfoFunc s_pfnAudio2Create = nullptr;
|
||||
static HMODULE s_dllInstance = NULL;
|
||||
static XAudio2CreateWithVersionInfoFunc s_pfnAudio2CreateWithVersion = NULL;
|
||||
static XAudio2CreateInfoFunc s_pfnAudio2Create = NULL;
|
||||
|
||||
if (s_dllInstance == nullptr)
|
||||
if (s_dllInstance == NULL)
|
||||
{
|
||||
s_dllInstance = LoadLibraryEx(XAUDIO2_DLL, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
|
||||
if (s_dllInstance == nullptr)
|
||||
{
|
||||
if (s_dllInstance == NULL)
|
||||
return HRESULT_FROM_WIN32(GetLastError());
|
||||
}
|
||||
|
||||
s_pfnAudio2CreateWithVersion = (XAudio2CreateWithVersionInfoFunc)(void*)GetProcAddress(s_dllInstance, "XAudio2CreateWithVersionInfo");
|
||||
if (s_pfnAudio2CreateWithVersion == nullptr)
|
||||
if (s_pfnAudio2CreateWithVersion == NULL)
|
||||
{
|
||||
s_pfnAudio2Create = (XAudio2CreateInfoFunc)(void*)GetProcAddress(s_dllInstance, "XAudio2Create");
|
||||
if (s_pfnAudio2Create == nullptr)
|
||||
{
|
||||
if (s_pfnAudio2Create == NULL)
|
||||
return HRESULT_FROM_WIN32(GetLastError());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (s_pfnAudio2CreateWithVersion != nullptr)
|
||||
{
|
||||
if (s_pfnAudio2CreateWithVersion != NULL)
|
||||
return (*s_pfnAudio2CreateWithVersion)(ppXAudio2, Flags, XAudio2Processor, NTDDI_VERSION);
|
||||
}
|
||||
return (*s_pfnAudio2Create)(ppXAudio2, Flags, XAudio2Processor);
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -687,11 +687,20 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
|
|||
}
|
||||
else
|
||||
{
|
||||
#if defined(__WINRT__)
|
||||
if (FAILED(D3D11CreateDevice(
|
||||
NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, flags,
|
||||
requested_feature_levels, number_feature_levels,
|
||||
D3D11_SDK_VERSION, &d3d11->device,
|
||||
&d3d11->supportedFeatureLevel, &d3d11->context)))
|
||||
#else
|
||||
if (FAILED(D3D11CreateDeviceAndSwapChain(
|
||||
NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, flags,
|
||||
requested_feature_levels, number_feature_levels,
|
||||
D3D11_SDK_VERSION, &desc,
|
||||
(IDXGISwapChain**)&d3d11->swapChain, &d3d11->device,
|
||||
&d3d11->supportedFeatureLevel, &d3d11->context)))
|
||||
#endif
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* RetroArch - A frontend for libretro.
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2016-2017 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
|
@ -349,7 +349,6 @@ static bool menu_display_vk_font_init_first(
|
|||
static void menu_display_vk_scissor_begin(video_frame_info_t *video_info,
|
||||
int x, int y, unsigned width, unsigned height)
|
||||
{
|
||||
VkRect2D sci;
|
||||
vk_t *vk = video_info ? (vk_t*)video_info->userdata : NULL;
|
||||
|
||||
vk->tracker.use_scissor = true;
|
||||
|
@ -362,7 +361,6 @@ static void menu_display_vk_scissor_begin(video_frame_info_t *video_info,
|
|||
|
||||
static void menu_display_vk_scissor_end(video_frame_info_t *video_info)
|
||||
{
|
||||
VkRect2D sci;
|
||||
vk_t *vk = video_info ? (vk_t*)video_info->userdata : NULL;
|
||||
vk->tracker.use_scissor = false;
|
||||
vk->tracker.dirty |= VULKAN_DIRTY_DYNAMIC_BIT;
|
||||
|
|
Loading…
Reference in New Issue