shithub: tinygl

Download patch

ref: 9beeefb7de7fea7b60ab870316e344c4a33c12e1
parent: 2242053557160670ad7142495038e25d7d9bf2a2
author: David <gek@katherine>
date: Wed Mar 10 13:49:13 EST 2021

Automatic commit.

--- a/SDL_Examples/include/openimgui.h
+++ b/SDL_Examples/include/openimgui.h
@@ -71,6 +71,8 @@
 extern int omg_cursor_was_inside;  //Set 
 extern float omg_buttonjump[2]; //Defaults to zero
 // Setting for users using 
+extern int bstate_old;
+extern int udlr_old[4];
 
 // cursor button
 extern int omg_cb; //Set to zero every iteration.
@@ -81,7 +83,8 @@
 int omg_cursor_was_inside;  //Set 
 float omg_buttonjump[2]; //Defaults to zero
 // Setting for users using 
-
+int bstate_old = 0;
+int udlr_old[4] = {0,0,0,0};
 // cursor button
 int omg_cb; //Set to zero every iteration.
 #endif
@@ -101,8 +104,7 @@
 }
 
 static inline void omg_update_keycursor(int _up, int _down, int _left, int _right, int bstate){
-	static int bstate_old = 0;
-	static int udlr_old[4] = {0,0,0,0};
+	
 	omg_cursor_was_inside = 0;
 	int up = _up && ! udlr_old[0];
 	int down = _down && ! udlr_old[1];
@@ -134,7 +136,6 @@
 
 //for mouse cursors and touch input.
 static inline void omg_update_mcursor(float ncx, float ncy, int bstate){
-	static int bstate_old = 0;
 	omg_cursor_has_been_sucked = 0;
 	omg_cursor_was_inside = 0;
 	omg_cursorpos[0] = ncx;
--- a/include/zfeatures.h
+++ b/include/zfeatures.h
@@ -100,7 +100,9 @@
 //Test the compatibility of the target platform at glInit() time.
 #define TGL_FEATURE_TINYGL_RUNTIME_COMPAT_TEST 1
 
+#define TINYGL_VERSION 0.8
+
 #endif 
 /* _tgl_features_h_ */
 
-#define TINYGL_VERSION 0.8
+