[Armadeus-commitlog] armadeus branch, master, updated. armadeus-6.0-61-g9e0385c
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2016-04-11 14:50:51
|
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 "armadeus".
The branch, master has been updated
via 9e0385c734c3d53bc20b8cb4728e98b63572fedd (commit)
from 1e4800037889aba512a77ffcbc58e66aa183e474 (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 -----------------------------------------------------------------
commit 9e0385c734c3d53bc20b8cb4728e98b63572fedd
Author: Julien BOIBESSOT <jul...@ar...>
Date: Mon Apr 11 16:46:46 2016 +0200
[DEMOS] Add the possibility to launch an action when pressing mouse button in capture demo.
-----------------------------------------------------------------------
Summary of changes:
target/demos/camera/capture/capture.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/target/demos/camera/capture/capture.c b/target/demos/camera/capture/capture.c
index c22124c..a0175ff 100644
--- a/target/demos/camera/capture/capture.c
+++ b/target/demos/camera/capture/capture.c
@@ -425,6 +425,8 @@ static int pause_capture = 0;
static void mainloop(void)
{
SDL_Event event;
+ struct stat exec_stat;
+ int ret;
while (go_on) {
for (;;) {
@@ -461,9 +463,23 @@ static void mainloop(void)
while (SDL_PollEvent(&event)) {
switch (event.type)
{
+ case SDL_MOUSEBUTTONUP:
+ {
+ ret = stat("/usr/local/bin/capture_hook", &exec_stat);
+ if (ret == 0) {
+ if (S_IXUSR & exec_stat.st_mode) {
+ system("/usr/local/bin/capture_hook &");
+ } else {
+ fprintf(stderr, "can't execute capture hook\n");
+ }
+ }
+ break;
+ }
+
case SDL_KEYDOWN:
case SDL_QUIT:
go_on = 0;
+ break;
}
}
while (pause_capture)
hooks/post-receive
--
armadeus
|