Mesa (master): trivial/tri_viewport: add space==reset key

Keith Whitwell keithw at kemper.freedesktop.org
Tue Apr 21 03:44:31 PDT 2009


Module: Mesa
Branch: master
Commit: a38f7d9e689f0e12cb8eed6b96a140805b452ba1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a38f7d9e689f0e12cb8eed6b96a140805b452ba1

Author: Keith Whitwell <keithw at vmware.com>
Date:   Mon Apr 20 17:32:15 2009 +0100

trivial/tri_viewport: add space==reset key

---

 progs/trivial/tri-viewport.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/progs/trivial/tri-viewport.c b/progs/trivial/tri-viewport.c
index c08089b..37e4244 100644
--- a/progs/trivial/tri-viewport.c
+++ b/progs/trivial/tri-viewport.c
@@ -72,7 +72,9 @@ static void Key(unsigned char key, int x, int y)
    case 'H':
       th -= 1.0;
       break;
-
+   case ' ':
+      tw = th = tx = ty = 0;
+      break;
    default:
       break;
    }



More information about the mesa-commit mailing list