mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
45e9f544cd
commit
f51e6b7d91
|
@ -262,7 +262,7 @@ void EnumRawInputDevices() {
|
||||||
if (list && pGetRawInputDeviceList(list, &count, sizeof(RAWINPUTDEVICELIST))) {
|
if (list && pGetRawInputDeviceList(list, &count, sizeof(RAWINPUTDEVICELIST))) {
|
||||||
for (UINT i=0; i<count; i++) {
|
for (UINT i=0; i<count; i++) {
|
||||||
UINT nameLen = 10000;
|
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) {
|
nameLen >= 3) {
|
||||||
wcscpy(productID, instanceID);
|
wcscpy(productID, instanceID);
|
||||||
wchar_t *temp = 0;
|
wchar_t *temp = 0;
|
||||||
|
|
Loading…
Reference in New Issue