From 75fc415164689057d09f9cd3d461b75f88e80898 Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Thu, 21 May 2009 07:35:14 +0000 Subject: [PATCH] Rearranged the functions --- src/gui-sdl/gui-sdl.c | 167 +++++++++++++++++++++--------------------- 1 file changed, 84 insertions(+), 83 deletions(-) diff --git a/src/gui-sdl/gui-sdl.c b/src/gui-sdl/gui-sdl.c index 62ba3a0..27eca45 100644 --- a/src/gui-sdl/gui-sdl.c +++ b/src/gui-sdl/gui-sdl.c @@ -67,89 +67,6 @@ static const char *other_messages[] = { }; -static void exit_fn(void) -{ - sleep(3); -} - -void gui_init (int argc, char **argv) -{ - printf("Init gui\n"); - atexit(exit_fn); -} - -int gui_open (void) -{ - return -1; -} - -void gui_notify_state (int state) -{ -} - -int gui_update (void) -{ - printf("Al-mibb: Gui is updejted!\n"); - return 0; -} - -void gui_exit (void) -{ -} - -void gui_fps (int fps, int idle) -{ - gui_data.fps = fps; - gui_data.idle = idle; -} - -void gui_led (int led, int on) -{ -} - -void gui_hd_led (int led) -{ - static int resetcounter; - - int old = gui_data.hd; - - if (led == 0) { - resetcounter--; - if (resetcounter > 0) - return; - } - - gui_data.hd = led; - resetcounter = 6; - if (old != gui_data.hd) - gui_led (5, gui_data.hd); -} - -void gui_cd_led (int led) -{ - static int resetcounter; - - int old = gui_data.cd; - if (led == 0) { - resetcounter--; - if (resetcounter > 0) - return; - } - - gui_data.cd = led; - resetcounter = 6; - if (old != gui_data.cd) - gui_led (6, gui_data.cd); -} - -void gui_filename (int num, const char *name) -{ -} - -void gui_handle_events (void) -{ -} - static int prefs_has_changed; static void insert_floppy(int which) @@ -279,6 +196,90 @@ static void save_load_state(int which) } } +static void exit_fn(void) +{ + sleep(3); +} + + + +void gui_init (int argc, char **argv) +{ + printf("Init gui\n"); + atexit(exit_fn); +} + +int gui_open (void) +{ + return -1; +} + +void gui_notify_state (int state) +{ +} + +int gui_update (void) +{ + printf("Al-mibb: Gui is updejted!\n"); + return 0; +} + +void gui_exit (void) +{ +} + +void gui_fps (int fps, int idle) +{ + gui_data.fps = fps; + gui_data.idle = idle; +} + +void gui_led (int led, int on) +{ +} + +void gui_hd_led (int led) +{ + static int resetcounter; + + int old = gui_data.hd; + + if (led == 0) { + resetcounter--; + if (resetcounter > 0) + return; + } + + gui_data.hd = led; + resetcounter = 6; + if (old != gui_data.hd) + gui_led (5, gui_data.hd); +} + +void gui_cd_led (int led) +{ + static int resetcounter; + + int old = gui_data.cd; + if (led == 0) { + resetcounter--; + if (resetcounter > 0) + return; + } + + gui_data.cd = led; + resetcounter = 6; + if (old != gui_data.cd) + gui_led (6, gui_data.cd); +} + +void gui_filename (int num, const char *name) +{ +} + +void gui_handle_events (void) +{ +} void gui_display(int shortcut) {