mirror of https://github.com/FreeRDP/FreeRDP
Merge pull request #4948 from bmiklautz/cleanup_pr_4581
new [cache/pointer]: don't require pointer functions to be set
This commit is contained in:
commit
1dc3c91a19
|
@ -71,7 +71,7 @@ static BOOL update_pointer_position(rdpContext* context,
|
|||
return FALSE;
|
||||
|
||||
pointer = context->graphics->Pointer_Prototype;
|
||||
return pointer->SetPosition(context, pointer_position->xPos,
|
||||
return IFCALLRESULT(TRUE, pointer->SetPosition, context, pointer_position->xPos,
|
||||
pointer_position->yPos);
|
||||
}
|
||||
|
||||
|
@ -89,17 +89,14 @@ static BOOL update_pointer_system(rdpContext* context,
|
|||
switch (pointer_system->type)
|
||||
{
|
||||
case SYSPTR_NULL:
|
||||
IFCALL(pointer->SetNull, context);
|
||||
break;
|
||||
return IFCALLRESULT(TRUE, pointer->SetNull, context);
|
||||
|
||||
case SYSPTR_DEFAULT:
|
||||
IFCALL(pointer->SetDefault, context);
|
||||
break;
|
||||
return IFCALLRESULT(TRUE, pointer->SetDefault, context);
|
||||
|
||||
default:
|
||||
WLog_ERR(TAG, "Unknown system pointer type (0x%08"PRIX32")", pointer_system->type);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -148,7 +145,7 @@ static BOOL update_pointer_color(rdpContext* context,
|
|||
if (!pointer_cache_put(cache->pointer, pointer_color->cacheIndex, pointer))
|
||||
goto out_fail;
|
||||
|
||||
return pointer->Set(context, pointer);
|
||||
return IFCALLRESULT(TRUE, pointer->Set, context, pointer);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
@ -209,7 +206,7 @@ static BOOL update_pointer_new(rdpContext* context,
|
|||
pointer))
|
||||
goto out_fail;
|
||||
|
||||
return pointer->Set(context, pointer);
|
||||
return IFCALLRESULT(TRUE, pointer->Set, context, pointer);
|
||||
out_fail:
|
||||
pointer_free(context, pointer);
|
||||
return FALSE;
|
||||
|
@ -223,10 +220,7 @@ static BOOL update_pointer_cached(rdpContext* context,
|
|||
pointer = pointer_cache_get(cache->pointer, pointer_cached->cacheIndex);
|
||||
|
||||
if (pointer != NULL)
|
||||
{
|
||||
pointer->Set(context, pointer);
|
||||
return TRUE;
|
||||
}
|
||||
return IFCALLRESULT(TRUE, pointer->Set, context, pointer);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue