X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=sdl_gui.c;h=c30465e57e1f74fe47c2fb34e10d134ad7624c5d;hb=7050cf4ed059227268e964604ca1c6597c856167;hp=d0bf2fbf65ae24df22e8224b3154f0720ff58286;hpb=adbf9f09c9bf2a680c61b1ef3541c04f1cde97cf;p=paraslash.git diff --git a/sdl_gui.c b/sdl_gui.c index d0bf2fbf..c30465e5 100644 --- a/sdl_gui.c +++ b/sdl_gui.c @@ -20,6 +20,7 @@ #include "para.h" #include "string.h" +#include "fd.h" #include @@ -42,7 +43,7 @@ static int width = 0; static int height = 0; extern const char *status_item_list[NUM_STAT_ITEMS]; -struct gengetopt_args_info args_info; +struct sdl_gui_args_info args_info; #define FRAME_WIDTH 10 #define FONT_HEIGHT 36 @@ -118,7 +119,7 @@ struct font fonts[] = { static struct stat_item stat_items[NUM_STAT_ITEMS]; -void para_log(__unused int ll, __unused const char* fmt,...) /* no logging */ +void para_log(__a_unused int ll, __a_unused const char* fmt,...) /* no logging */ { } @@ -698,13 +699,11 @@ static int draw_status(int pipe) tv.tv_usec = 3000000; FD_ZERO(&rfds); FD_SET(pipe, &rfds); - ret = select(pipe + 1, &rfds, NULL, NULL, &tv); -// printf("select returned %d\n", ret); + ret = para_select(pipe + 1, &rfds, NULL, &tv); if (ret <= 0) return 0; if (read_audiod_pipe(pipe, update_status) > 0) return 1; -// clear_all_items(); free(stat_items[SI_STATUS_BAR].content); stat_items[SI_STATUS_BAR].content = para_strdup("audiod not running!?\n"); @@ -743,7 +742,7 @@ int main(int argc, char *argv[]) int i, ret, pipe; SDLKey sym; - cmdline_parser(argc, argv, &args_info); + sdl_gui_cmdline_parser(argc, argv, &args_info); ret = configfile_exists(); // printf("w=%i,h=%i,ret=%i, cf=%s\n", width, height, ret, args_info.config_file_arg); @@ -753,7 +752,7 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } if (ret) - cmdline_parser_configfile(args_info.config_file_arg, + sdl_gui_cmdline_parser_configfile(args_info.config_file_arg, &args_info, 0, 0, 0); signal(SIGCHLD, SIG_IGN); width = args_info.width_arg;