summaryrefslogtreecommitdiffstats
path: root/host/windows/usb/api/adb_api.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/windows/usb/api/adb_api.cpp')
-rw-r--r--host/windows/usb/api/adb_api.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/host/windows/usb/api/adb_api.cpp b/host/windows/usb/api/adb_api.cpp
index eadf07abc..f9bd94e6c 100644
--- a/host/windows/usb/api/adb_api.cpp
+++ b/host/windows/usb/api/adb_api.cpp
@@ -24,6 +24,8 @@
#include "adb_object_handle.h"
#include "adb_interface_enum.h"
#include "adb_interface.h"
+#include "adb_winusb_interface.h"
+#include "adb_legacy_interface.h"
#include "adb_endpoint_object.h"
#include "adb_io_completion.h"
#include "adb_helper_routines.h"
@@ -100,7 +102,11 @@ ADBAPIHANDLE __cdecl AdbCreateInterfaceByName(
try {
// Instantiate object
- obj = new AdbInterfaceObject(interface_name);
+ if (IsLegacyInterface(interface_name)) {
+ obj = new AdbLegacyInterfaceObject(interface_name);
+ } else {
+ obj = new AdbWinUsbInterfaceObject(interface_name);
+ }
// Create handle for it
ret = obj->CreateHandle();