|
From: <mla...@us...> - 2006-11-15 02:47:27
|
Revision: 143
http://svn.sourceforge.net/g15daemon/?rev=143&view=rev
Author: mlampard
Date: 2006-11-14 18:47:27 -0800 (Tue, 14 Nov 2006)
Log Message:
-----------
ensure that newly switched screens are displayed instantly
Modified Paths:
--------------
trunk/g15daemon-wip/g15daemon/main.c
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2006-11-15 01:57:07 UTC (rev 142)
+++ trunk/g15daemon-wip/g15daemon/main.c 2006-11-15 02:47:27 UTC (rev 143)
@@ -175,6 +175,7 @@
static unsigned int lastscreentime;
unsigned int fps = 0;
lcd_t *displaying = displaylist->tail->lcd;
+ lcd_t *lastdisplayed=NULL;
memset(displaying->buf,0,1024);
g15daemon_sleep(2);
@@ -188,9 +189,10 @@
/* monitor 'fps' - due to the TCP protocol, some frames will be bunched up.
discard excess to reduce load on the bus - FIXME*/
fps = 1000 / (g15daemon_gettime_ms() - lastscreentime);
- if(fps<50){ //peak fps rate - most plugins/clients will never come close
+ if(fps<50||displaying!=lastdisplayed){ //peak fps rate - most plugins/clients will never come close
uf_write_buf_to_g15(displaying);
lastscreentime = g15daemon_gettime_ms();
+ lastdisplayed = displaying;
}
lastlcd = displaying->ident;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|