better performance feedback
[vg.git] / src / vg / vg_input.h
index c33853136ceb01e15dd8ff94dbd7c383ddd8eff6..1cbc19371398cf8f9374ab9f152c4f239491db1f 100644 (file)
@@ -7,6 +7,10 @@
 
 static inline float vg_get_axis( const char *axis );
 static inline int vg_get_button( const char *button );
+
+/*
+ * Cannot be used in fixed update
+ */
 static inline int vg_get_button_down( const char *button );
 static inline int vg_get_button_up( const char *button );
 
@@ -113,6 +117,9 @@ static inline int vg_get_button( const char *button )
 
 static inline int vg_get_button_down( const char *button )
 {
+   if( vg.engine_stage == k_engine_stage_update_fixed )
+      vg_fatal_exit_loop( "Cannot use that here\n" );
+
    int cur, prev;
    vg_get_button_states( button, &cur, &prev );
 
@@ -121,6 +128,9 @@ static inline int vg_get_button_down( const char *button )
 
 static inline int vg_get_button_up( const char *button )
 {
+   if( vg.engine_stage == k_engine_stage_update_fixed )
+      vg_fatal_exit_loop( "Cannot use that here\n" );
+
    int cur, prev;
    vg_get_button_states( button, &cur, &prev );