Read about our upcoming Code of Conduct on this issue

Commit 7d1b9728 authored by a1ex's avatar a1ex
Browse files

Startup & GUI task tweaks/fixes

--HG--
branch : unified
parent 63970140c386
......@@ -278,7 +278,7 @@ void hold_your_horses(int showlogo)
{
while (_hold_your_horses)
{
msleep( 500 );
msleep( 100 );
}
}
......
......@@ -302,8 +302,9 @@ config_parse_file(
config_file_buf = read_entire_file(filename, &config_file_size);
if (!config_file_buf)
{
// if config file is not present, force Config Autosave: On
extern int config_autosave;
config_autosave = 1;
if (!config_autosave) config_autosave_toggle(0);
}
config_file_pos = 0;
config_parse();
......
......@@ -555,6 +555,7 @@ void fake_simple_button(int bgmt_code)
static void gui_main_task_550d()
{
fake_sem = create_named_semaphore("fake_sem", 1);
bmp_sem_init();
struct event * event = NULL;
int index = 0;
......@@ -574,13 +575,24 @@ static void gui_main_task_550d()
//~ console_printf("%d %d %d\n", event->type, event->param, event->arg);
if (!magic_is_off())
if (handle_buttons(event) == 0)
continue;
{
handle_buttons_active = 1;
int should_handle = handle_buttons(event);
handle_buttons_active = 0;
if (should_handle == 0)
goto bottom;
}
BMP_SEM (
//~ BMP_SEM (
void(*f)(struct event *) = funcs[index];
f(event);
);
//~ );
bottom:
if (event == &fake_event)
{
give_semaphore(fake_sem);
}
}
}
......
......@@ -620,11 +620,10 @@ static void gui_main_task_60d()
goto bottom;
}
BMP_SEM(
//~ BMP_SEM(
void(*f)(struct event *) = funcs[index];
f(event);
)
//~ )
bottom:
if (event == &fake_event)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment