Author: mdk
Date: 2008-02-15 08:58:02 -0500 (Fri, 15 Feb 2008)
New Revision: 95752

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/runtime.cpp
   trunk/moon/src/runtime.h
Log:
2008-02-15  Michael Dominic K.  <[EMAIL PROTECTED]>

        * src/runtime.cpp:
        * src/runtime.h: Adding an extra DEBUG_MARKER_KEY define (disabled by
        default) that changes your 'd' key into a special debug key. When 
pressed,
        a message is printed to the console (region start). When pressed again,
        another message is printed (region end). This is usefull to see what
        happens in a particular part of the program timeline (ie. after click).

        Makes sense obviously only with timers debugging on and stuff.


Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2008-02-15 13:45:11 UTC (rev 95751)
+++ trunk/moon/src/ChangeLog    2008-02-15 13:58:02 UTC (rev 95752)
@@ -1,3 +1,14 @@
+2008-02-15  Michael Dominic K.  <[EMAIL PROTECTED]> 
+
+       * src/runtime.cpp:
+       * src/runtime.h: Adding an extra DEBUG_MARKER_KEY define (disabled by
+       default) that changes your 'd' key into a special debug key. When 
pressed,
+       a message is printed to the console (region start). When pressed again,
+       another message is printed (region end). This is usefull to see what
+       happens in a particular part of the program timeline (ie. after click). 
+
+       Makes sense obviously only with timers debugging on and stuff.
+
 2008-02-14  Michael Dominic K.  <[EMAIL PROTECTED]>
 
        * src/clock.cpp: Changing max/default FPS to 50. Empirical experience

Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp  2008-02-15 13:45:11 UTC (rev 95751)
+++ trunk/moon/src/runtime.cpp  2008-02-15 13:58:02 UTC (rev 95752)
@@ -1540,6 +1540,18 @@
        if (s->FullScreenKeyHandled (key))
                return TRUE;
 
+#if DEBUG_MARKER_KEY
+       static int debug_marker_key_in = 0;
+       if (key->keyval == GDK_d || key->keyval == GDK_D) {
+               if (! debug_marker_key_in)
+                       printf ("<--- DEBUG MARKER KEY IN (%f) --->\n", get_now 
() / 10000000.0);
+               else
+                       printf ("<--- DEBUG MARKER KEY OUT (%f) --->\n", 
get_now () / 10000000.0);
+               debug_marker_key_in = ! debug_marker_key_in;
+               return TRUE;
+       }
+#endif
+
        s->SetCanFullScreen (true);
        // key events are only ever delivered to the toplevel
        s->toplevel->EmitKeyDown (key->state, gdk_keyval_to_key (key->keyval), 
key->hardware_keycode);

Modified: trunk/moon/src/runtime.h
===================================================================
--- trunk/moon/src/runtime.h    2008-02-15 13:45:11 UTC (rev 95751)
+++ trunk/moon/src/runtime.h    2008-02-15 13:58:02 UTC (rev 95752)
@@ -32,6 +32,7 @@
 #define FRONT_TO_BACK_STATS 0
 
 #define TIMERS 0
+#define DEBUG_MARKER_KEY 0
 #if TIMERS
 #define STARTTIMER(id,str) TimeSpan id##_t_start = get_now(); printf ("timing 
of '%s' started at %lld\n", str, id##_t_start)
 #define ENDTIMER(id,str) TimeSpan id##_t_end = get_now(); printf ("timing of 
'%s' ended at %lld (%f seconds)\n", str, id##_t_end, (double)(id##_t_end - 
id##_t_start) / 10000000)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to