Skip to content

Commit

Permalink
Android: native: use new API to set rect we're interested in
Browse files Browse the repository at this point in the history
Closes #211
  • Loading branch information
bk138 committed Aug 25, 2023
1 parent f7b534c commit ca40ecb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions android/app/src/main/cpp/vncconn.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,13 +927,14 @@ JNIEXPORT jboolean JNICALL Java_com_coboltforge_dontmind_multivnc_VNCConn_rfbSet
if(cl) {
log_obj_tostring(env, obj, ANDROID_LOG_INFO, "rfbSetFramebufferUpdatesEnabled() %d", enable);
if(enable) {
// set
cl->supportedMessages.client2server[((rfbFramebufferUpdateRequest & 0xFF)/8)] |= (1<<(rfbFramebufferUpdateRequest % 8));
// set to managed-by-lib again
rfbClientSetUpdateRect(cl, NULL);
// request full update
SendFramebufferUpdateRequest(cl, 0, 0, cl->width, cl->height, FALSE);
} else {
// clear
cl->supportedMessages.client2server[((rfbFramebufferUpdateRequest & 0xFF)/8)] &= ~(1<<(rfbFramebufferUpdateRequest % 8));
// set to no-updates-wanted
rfbRectangle noRect = {0,0,0,0,};
rfbClientSetUpdateRect(cl, &noRect);
}
return JNI_TRUE;
}
Expand Down

0 comments on commit ca40ecb

Please sign in to comment.