mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-10 14:23:57 +00:00
[c-host] dxgi: check for failure of getDesc1
This commit is contained in:
parent
127113a59b
commit
0dc0e6490c
2 changed files with 7 additions and 2 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
B1-50-g49bf115c84+1
|
B1-51-g127113a59b+1
|
|
@ -240,7 +240,12 @@ static bool dxgi_init(void * pointerShape, const unsigned int pointerSize)
|
||||||
if (optAdapter)
|
if (optAdapter)
|
||||||
{
|
{
|
||||||
DXGI_ADAPTER_DESC1 adapterDesc;
|
DXGI_ADAPTER_DESC1 adapterDesc;
|
||||||
IDXGIAdapter1_GetDesc1(this->adapter, &adapterDesc);
|
status = IDXGIAdapter1_GetDesc1(this->adapter, &adapterDesc);
|
||||||
|
if (FAILED(status))
|
||||||
|
{
|
||||||
|
DEBUG_WINERROR("Failed to get the device description", status);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
const size_t s = (wcslen(adapterDesc.Description)+1) * 2;
|
const size_t s = (wcslen(adapterDesc.Description)+1) * 2;
|
||||||
char * desc = malloc(s);
|
char * desc = malloc(s);
|
||||||
|
|
Loading…
Reference in a new issue