[core] clean up and simplify USB port & speed detection

* Also fix non-present devices being enumerated
* Also add a message in the log when an USB 3.0 device is detected operating at lower speed
This commit is contained in:
Pete Batard 2014-05-19 00:56:17 +01:00
parent c85670f7b7
commit 420bb1d0d8
4 changed files with 72 additions and 84 deletions

View file

@ -203,7 +203,7 @@ uint32_t htab_hash(char* str, htab_table* htab)
BOOL is_x64(void)
{
BOOL ret = FALSE;
PF_TYPE_DECL(__stdcall, BOOL, IsWow64Process, (HANDLE, PBOOL));
PF_TYPE_DECL(WINAPI, BOOL, IsWow64Process, (HANDLE, PBOOL));
// Detect if we're running a 32 or 64 bit system
if (sizeof(uintptr_t) < 8) {
PF_INIT(IsWow64Process, Kernel32);