This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via df87777210da0ea03b70f5d8cf138050a5399e05 (commit) from 57673b3b830b3d6434956c656d0cec95156314cc (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/df87777210da0ea03b70f5d8cf138050a5399...
commit df87777210da0ea03b70f5d8cf138050a5399e05 Author: Cyril Hrubis metan@ucw.cz Date: Thu Dec 27 01:38:23 2012 +0100
demos: c_simple: Update backend example.
diff --git a/demos/c_simple/backend_example.c b/demos/c_simple/backend_example.c index 063da75..3d565ef 100644 --- a/demos/c_simple/backend_example.c +++ b/demos/c_simple/backend_example.c @@ -71,10 +71,8 @@ int main(int argc, char *argv[]) GP_BackendFlip(backend);
for (;;) { - if (backend->Poll) - GP_BackendPoll(backend); - - usleep(1000); + /* Wait for backend event */ + GP_BackendWait(backend);
/* Read and parse events */ GP_Event ev; @@ -85,13 +83,20 @@ int main(int argc, char *argv[]) switch (ev.type) { case GP_EV_KEY: - switch (ev.val.key.key) { + switch (ev.val.val) { case GP_KEY_ESC: case GP_KEY_Q: GP_BackendExit(backend); return 0; break; } + break; + case GP_EV_SYS: + case GP_EV_SYS_QUIT: + GP_BackendExit(backend); + return 0; + break; + break; } } }
-----------------------------------------------------------------------
Summary of changes: demos/c_simple/backend_example.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.