diff options
-rw-r--r-- | examples/sample-photobooth.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/examples/sample-photobooth.c b/examples/sample-photobooth.c index 180e4e366..67588accd 100644 --- a/examples/sample-photobooth.c +++ b/examples/sample-photobooth.c @@ -17,8 +17,7 @@ #define CONFIG_FILE "config.txt" #define PREVIEW "preview.jpg" -static void errordumper(GPLogLevel level, const char *domain, const char *str, - void *data) { +static void errordumper(GPLogLevel level, const char *domain, const char *str, void *data) { /* printf("%s (data %p)\n", str,data);*/ } @@ -70,15 +69,19 @@ capture_to_file(Camera *camera, GPContext *context, char *fn) { static void sig_handler_capture_now (int sig_num) { - signal (SIGUSR1, sig_handler_capture_now); - capture_now = 1; +#if !defined (WIN32) + signal (SIGUSR1, sig_handler_capture_now); +#endif + capture_now = 1; } static void sig_handler_read_config (int sig_num) { - signal (SIGUSR2, sig_handler_read_config); - read_config = 1; +#if !defined (WIN32) + signal (SIGUSR2, sig_handler_read_config); +#endif + read_config = 1; } int @@ -94,8 +97,10 @@ main(int argc, char **argv) { printf("kill -USR2 %d to read the 'config.txt'.\n", getpid()); printf("kill -TERM %d to finish.\n", getpid()); - signal (SIGUSR1, sig_handler_capture_now); - signal (SIGUSR2, sig_handler_read_config); +#if !defined (WIN32) + signal (SIGUSR1, sig_handler_capture_now); + signal (SIGUSR2, sig_handler_read_config); +#endif gp_log_add_func(GP_LOG_ERROR, errordumper, 0); gp_camera_new(&camera); |