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:
MartinHaimberger 2018-10-19 11:10:23 +02:00 committed by GitHub
commit 1dc3c91a19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 12 deletions

View File

@ -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;
}