summaryrefslogtreecommitdiffstats
path: root/video/out/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/gpu')
-rw-r--r--video/out/gpu/d3d11_helpers.c16
-rw-r--r--video/out/gpu/d3d11_helpers.h2
2 files changed, 7 insertions, 11 deletions
diff --git a/video/out/gpu/d3d11_helpers.c b/video/out/gpu/d3d11_helpers.c
index 9e05b7b878..6ea778a875 100644
--- a/video/out/gpu/d3d11_helpers.c
+++ b/video/out/gpu/d3d11_helpers.c
@@ -160,7 +160,7 @@ static int get_feature_levels(int max_fl, int min_fl,
}
static IDXGIAdapter1 *get_d3d11_adapter(struct mp_log *log,
- char *requested_adapter_name,
+ struct bstr requested_adapter_name,
struct bstr *listing)
{
HRESULT hr = S_OK;
@@ -204,8 +204,8 @@ static IDXGIAdapter1 *get_d3d11_adapter(struct mp_log *log,
adapter_description ? adapter_description : "<No Description>");
}
- if (requested_adapter_name && adapter_description &&
- !strcmp(requested_adapter_name, adapter_description))
+ if (adapter_description &&
+ bstr_equals0(requested_adapter_name, adapter_description))
{
picked_adapter = adapter;
break;
@@ -239,7 +239,7 @@ static HRESULT create_device(struct mp_log *log, IDXGIAdapter1 *adapter,
}
bool mp_d3d11_list_or_verify_adapters(struct mp_log *log,
- bstr *adapter_name,
+ bstr adapter_name,
bstr *listing)
{
IDXGIAdapter1 *picked_adapter = NULL;
@@ -248,11 +248,7 @@ bool mp_d3d11_list_or_verify_adapters(struct mp_log *log,
return false;
}
- if ((picked_adapter = get_d3d11_adapter(log,
- adapter_name ?
- (char *)adapter_name->start : NULL,
- listing)))
- {
+ if ((picked_adapter = get_d3d11_adapter(log, adapter_name, listing))) {
SAFE_RELEASE(picked_adapter);
return true;
}
@@ -283,7 +279,7 @@ bool mp_d3d11_create_present_device(struct mp_log *log,
goto done;
}
- adapter = get_d3d11_adapter(log, adapter_name, NULL);
+ adapter = get_d3d11_adapter(log, bstr0(adapter_name), NULL);
if (adapter_name && !adapter) {
mp_warn(log, "Adapter '%s' was not found in the system! "
diff --git a/video/out/gpu/d3d11_helpers.h b/video/out/gpu/d3d11_helpers.h
index cd22d4b145..2ffc4ec40d 100644
--- a/video/out/gpu/d3d11_helpers.h
+++ b/video/out/gpu/d3d11_helpers.h
@@ -60,7 +60,7 @@ struct d3d11_device_opts {
};
bool mp_d3d11_list_or_verify_adapters(struct mp_log *log,
- bstr *adapter_name,
+ bstr adapter_name,
bstr *listing);
bool mp_d3d11_create_present_device(struct mp_log *log,