Silence some warnings

This commit is contained in:
twinaphex 2018-12-29 02:12:50 +01:00
parent f82b6e07ba
commit 0e5fbbb9e1
3 changed files with 5 additions and 9 deletions

View File

@ -215,13 +215,8 @@ bool d3d12_init_queue(d3d12_video_t* d3d12)
return true; return true;
} }
#ifdef __WINRT__
bool d3d12_init_swapchain(d3d12_video_t* d3d12, bool d3d12_init_swapchain(d3d12_video_t* d3d12,
int width, int height, void* corewindow) int width, int height, void* corewindow)
#else
bool d3d12_init_swapchain(d3d12_video_t* d3d12,
int width, int height, HWND hwnd)
#endif
{ {
unsigned i; unsigned i;
#ifdef __WINRT__ #ifdef __WINRT__
@ -229,6 +224,7 @@ bool d3d12_init_swapchain(d3d12_video_t* d3d12,
memset(&desc, 0, sizeof(DXGI_SWAP_CHAIN_DESC1)); memset(&desc, 0, sizeof(DXGI_SWAP_CHAIN_DESC1));
#else #else
DXGI_SWAP_CHAIN_DESC desc; DXGI_SWAP_CHAIN_DESC desc;
HWND hwnd = (HWND)corewindow;
memset(&desc, 0, sizeof(DXGI_SWAP_CHAIN_DESC)); memset(&desc, 0, sizeof(DXGI_SWAP_CHAIN_DESC));
#endif #endif
@ -324,7 +320,7 @@ static D3D12_CPU_DESCRIPTOR_HANDLE d3d12_descriptor_heap_slot_alloc(d3d12_descri
static void static void
d3d12_descriptor_heap_slot_free(d3d12_descriptor_heap_t* heap, D3D12_CPU_DESCRIPTOR_HANDLE handle) d3d12_descriptor_heap_slot_free(d3d12_descriptor_heap_t* heap, D3D12_CPU_DESCRIPTOR_HANDLE handle)
{ {
int i; unsigned i;
if (!handle.ptr) if (!handle.ptr)
return; return;
@ -336,7 +332,7 @@ d3d12_descriptor_heap_slot_free(d3d12_descriptor_heap_t* heap, D3D12_CPU_DESCRIP
assert(heap->map[i]); assert(heap->map[i]);
heap->map[i] = false; heap->map[i] = false;
if (heap->start > i) if (heap->start > (int)i)
heap->start = i; heap->start = i;
} }

View File

@ -1505,7 +1505,7 @@ bool d3d12_init_pipeline(
D3D12_GRAPHICS_PIPELINE_STATE_DESC* desc, D3D12_GRAPHICS_PIPELINE_STATE_DESC* desc,
D3D12PipelineState* out); D3D12PipelineState* out);
bool d3d12_init_swapchain(d3d12_video_t* d3d12, int width, int height, HWND hwnd); bool d3d12_init_swapchain(d3d12_video_t* d3d12, int width, int height, void *corewindow);
bool d3d12_init_queue(d3d12_video_t* d3d12); bool d3d12_init_queue(d3d12_video_t* d3d12);

View File

@ -2665,7 +2665,7 @@ void hex32_to_rgba_normalized(uint32_t hex, float* rgba, float alpha)
void menu_subsystem_populate(const struct retro_subsystem_info* subsystem, menu_displaylist_info_t *info) void menu_subsystem_populate(const struct retro_subsystem_info* subsystem, menu_displaylist_info_t *info)
{ {
int i = 0; unsigned i = 0;
if (subsystem && subsystem_current_count > 0) if (subsystem && subsystem_current_count > 0)
{ {
for (i = 0; i < subsystem_current_count; i++, subsystem++) for (i = 0; i < subsystem_current_count; i++, subsystem++)