summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authordscho <dscho>2004-01-21 15:25:41 +0000
committerdscho <dscho>2004-01-21 15:25:41 +0000
commit34fc97a52add15a0b3060fac23bad6bc5324403a (patch)
tree5fd054e0800f6b046e40f9664994cd1eb0bc29f3 /main.c
parent3a472f8805ad45f43101900126b86c11a5cf01c5 (diff)
downloadlibvncserver-34fc97a52add15a0b3060fac23bad6bc5324403a.zip
libvncserver-34fc97a52add15a0b3060fac23bad6bc5324403a.tar.gz
add "-progressive height" option to make SendFramebufferUpdate "preemptive"
Diffstat (limited to 'main.c')
-rw-r--r--main.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/main.c b/main.c
index 6eded98..e6d7969 100644
--- a/main.c
+++ b/main.c
@@ -589,6 +589,11 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
rfbScreen->passwordCheck = defaultPasswordCheck;
+ rfbScreen->ignoreSIGPIPE = TRUE;
+
+ /* disable progressive updating per default */
+ rfbScreen->progressiveSliceHeight = 0;
+
if(!rfbProcessArguments(rfbScreen,argc,argv)) {
free(rfbScreen);
return 0;
@@ -638,8 +643,6 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
/* initialize client list and iterator mutex */
rfbClientListInit(rfbScreen);
- rfbScreen->ignoreSIGPIPE = TRUE;
-
return(rfbScreen);
}
@@ -801,7 +804,7 @@ rfbProcessEvents(rfbScreenInfoPtr rfbScreen,long usec)
while(cl) {
if (cl->sock >= 0 && !cl->onHold && FB_UPDATE_PENDING(cl) &&
!sraRgnEmpty(cl->requestedRegion)) {
- if(cl->screen->rfbDeferUpdateTime == 0) {
+ if(rfbScreen->rfbDeferUpdateTime == 0) {
rfbSendFramebufferUpdate(cl,cl->modifiedRegion);
} else if(cl->startDeferring.tv_usec == 0) {
gettimeofday(&cl->startDeferring,NULL);
@@ -812,7 +815,7 @@ rfbProcessEvents(rfbScreenInfoPtr rfbScreen,long usec)
if(tv.tv_sec < cl->startDeferring.tv_sec /* at midnight */
|| ((tv.tv_sec-cl->startDeferring.tv_sec)*1000
+(tv.tv_usec-cl->startDeferring.tv_usec)/1000)
- > cl->screen->rfbDeferUpdateTime) {
+ > rfbScreen->rfbDeferUpdateTime) {
cl->startDeferring.tv_usec = 0;
rfbSendFramebufferUpdate(cl,cl->modifiedRegion);
}
OpenPOWER on IntegriCloud