LilyPad: fixed a crash under remote desktop, GetRawInputDeviceInfo may return -1, the buffer size it wants is around a megabyte and gets filled with junk, just ignoring it seems fine.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1004 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gabest11 2009-04-18 09:31:16 +00:00
parent 45e9f544cd
commit f51e6b7d91
1 changed files with 1 additions and 1 deletions

View File

@ -262,7 +262,7 @@ void EnumRawInputDevices() {
if (list && pGetRawInputDeviceList(list, &count, sizeof(RAWINPUTDEVICELIST))) {
for (UINT i=0; i<count; i++) {
UINT nameLen = 10000;
if (pGetRawInputDeviceInfo(list[i].hDevice, RIDI_DEVICENAME, instanceID, &nameLen) &&
if ((int)pGetRawInputDeviceInfo(list[i].hDevice, RIDI_DEVICENAME, instanceID, &nameLen) > 0 &&
nameLen >= 3) {
wcscpy(productID, instanceID);
wchar_t *temp = 0;