[core] re-add the VID:PID lookup fallback using the Device ID string

* The call for the node connection information will fail for device such as Mp3 media players
* In that case, we can still obtain the VID:PID from the Device ID
* Also improve mutex release for commandline hogger
This commit is contained in:
Pete Batard 2014-06-02 00:51:35 +01:00
parent d5bb6bfe6f
commit 8b9c180404
3 changed files with 33 additions and 13 deletions

View file

@ -2101,7 +2101,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
}
input[i].type = INPUT_KEYBOARD;
input[i].ki.wVk = VK_RETURN;
// SetWindowPos(GetConsoleWindow(), HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
SendInput(i+1, input, sizeof(INPUT));
safe_free(input);
}
@ -2390,9 +2389,11 @@ relaunch:
}
out:
// Destroy our commandline hogger first, so that we can delete the app
ReleaseMutex(hogmutex);
safe_closehandle(hogmutex);
// Destroy the hogger mutex first, so that the cmdline app can exit and we can delete it
if (attached_console) {
ReleaseMutex(hogmutex);
safe_closehandle(hogmutex);
}
if ((!external_loc_file) && (loc_file[0] != 0))
DeleteFileU(loc_file);
DestroyAllTooltips();