gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog gui/fb.cpp


From: Udo Giacomozzi
Subject: [Gnash-commit] gnash ChangeLog gui/fb.cpp
Date: Wed, 24 Oct 2007 13:16:26 +0000

CVSROOT:        /cvsroot/gnash
Module name:    gnash
Changes by:     Udo Giacomozzi <udog>   07/10/24 13:16:26

Modified files:
        .              : ChangeLog 
        gui            : fb.cpp 

Log message:
        gui/fb.cpp: Limit pointing device events reading loop

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4684&r2=1.4685
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fb.cpp?cvsroot=gnash&r1=1.43&r2=1.44

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.4684
retrieving revision 1.4685
diff -u -b -r1.4684 -r1.4685
--- ChangeLog   24 Oct 2007 12:55:36 -0000      1.4684
+++ ChangeLog   24 Oct 2007 13:16:26 -0000      1.4685
@@ -6,6 +6,7 @@
          masks (don't invalidate outside of masks)     
        * backend/render_handler_agg.cpp: never use even-odd filling
          rules when drawing a mask (unlike normal shapes); some cleanup
+       * gui/fb.cpp: Limit pointing device events reading loop
 
 2007-10-24 Sandro Santilli <address@hidden>
 

Index: gui/fb.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/gui/fb.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- gui/fb.cpp  19 Oct 2007 15:43:38 -0000      1.43
+++ gui/fb.cpp  24 Oct 2007 13:16:26 -0000      1.44
@@ -944,10 +944,15 @@
   // this is necessary for our quick'n'dirty touchscreen calibration: 
   static int coordinatedebug = getenv("DUMP_RAW")!=NULL;
   
+  // The while loop is limited because the kernel tends to send us hundreds
+  // of events while the touchscreen is touched. We don't loose any 
+  // information if we stop reading because the kernel will stop
+  // sending redundant information.
+  int loops=0;  
   
   // Assuming we will never read less than one full struct...
   
-  while (read(input_fd, &ev, sizeof ev) == (sizeof ev)) {
+  while ((loops++ < 8) && (read(input_fd, &ev, sizeof ev) == (sizeof ev))) {
   
     if (ev.type == EV_SYN) {    // synchronize (apply information)
     




reply via email to

[Prev in Thread] Current Thread [Next in Thread]