Rearranged the functions

This commit is contained in:
simon.kagstrom 2009-05-21 07:35:14 +00:00
parent c146a7cbd0
commit 75fc415164

View File

@ -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)
{