Merge pull request #5246 from wintersandroid/master

Resolve Gfx mode missing surface updates from cache.
This commit is contained in:
akallabeth 2019-02-13 08:45:19 +01:00 committed by GitHub
commit 709d9fc974
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 20 deletions

1
.gitignore vendored
View File

@ -150,3 +150,4 @@ packaging/deb/freerdp-nightly/freerdp-nightly-dbg
# VisualStudio Code
.vscode
cache/

View File

@ -130,24 +130,6 @@ static void android_OnChannelDisconnectedEventHandler(
static BOOL android_begin_paint(rdpContext* context)
{
rdpGdi* gdi;
HGDI_WND hwnd;
if (!context)
return FALSE;
gdi = context->gdi;
if (!gdi || !gdi->primary || !gdi->primary->hdc)
return FALSE;
hwnd = gdi->primary->hdc->hwnd;
if (!hwnd || !hwnd->invalid)
return FALSE;
hwnd->invalid->null = TRUE;
hwnd->ninvalid = 0;
return TRUE;
}
@ -182,9 +164,9 @@ static BOOL android_end_paint(rdpContext* context)
ninvalid = hwnd->ninvalid;
if (ninvalid == 0)
if (ninvalid < 1)
return TRUE;
cinvalid = hwnd->cinvalid;
if (!cinvalid)
@ -205,6 +187,9 @@ static BOOL android_end_paint(rdpContext* context)
freerdp_callback("OnGraphicsUpdate", "(JIIII)V", (jlong)context->instance,
x1, y1, x2 - x1, y2 - y1);
hwnd->invalid->null = TRUE;
hwnd->ninvalid = 0;
return TRUE;
}