Fix some Win32 build issues.

This commit is contained in:
Themaister 2014-06-17 17:51:12 +02:00
parent 15c35d7e44
commit 89f052f5e5
2 changed files with 8 additions and 3 deletions

View File

@ -46,6 +46,11 @@ static DSMIXBINS dsmb;
#include <stdint.h>
#include <string.h>
#ifndef _XBOX
// Need these includes in MinGW-w64 4.9 it seems ...
#include <mmreg.h>
#include <mmsystem.h>
#endif
#include <dsound.h>
#include "../fifo_buffer.h"
#include "../general.h"

View File

@ -644,14 +644,14 @@ static bool guid_is_xinput_device(const GUID* product_guid)
/* Go through RAWINPUT (WinXP and later) to find HID devices. */
if (!raw_devs)
{
if ((GetRawInputDeviceList(NULL, &num_raw_devs, sizeof (RAWINPUTDEVICELIST)) == -1) || (!num_raw_devs))
if ((GetRawInputDeviceList(NULL, &num_raw_devs, sizeof(RAWINPUTDEVICELIST)) == (UINT)-1) || (!num_raw_devs))
return false;
raw_devs = (PRAWINPUTDEVICELIST) malloc(sizeof(RAWINPUTDEVICELIST) * num_raw_devs);
raw_devs = (PRAWINPUTDEVICELIST)malloc(sizeof(RAWINPUTDEVICELIST) * num_raw_devs);
if (!raw_devs)
return false;
if (GetRawInputDeviceList(raw_devs, &num_raw_devs, sizeof (RAWINPUTDEVICELIST)) == -1)
if (GetRawInputDeviceList(raw_devs, &num_raw_devs, sizeof (RAWINPUTDEVICELIST)) == (UINT)-1)
{
free(raw_devs);
raw_devs = NULL;