diff options
author | erdgeist <erdgeist@bauklotz.fritz.box> | 2018-04-02 01:38:48 +0200 |
---|---|---|
committer | erdgeist <erdgeist@bauklotz.fritz.box> | 2018-04-02 01:38:48 +0200 |
commit | caca33c9f0315d0f7b722d84cfa84e8b47f82c1c (patch) | |
tree | f39cffced94d17c75f0bf2b22ad5041586e4d984 | |
parent | 57bd5755394aeb965f3339e4bd523edbe6986be1 (diff) |
be more precise regarding harfe config source and connect state
-rw-r--r-- | engine.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -11,6 +11,7 @@ static int g_selected_string = -1; | |||
11 | 11 | ||
12 | #ifndef NO_DISPLAY | 12 | #ifndef NO_DISPLAY |
13 | #include "display.h" | 13 | #include "display.h" |
14 | #include "menu.h" | ||
14 | 15 | ||
15 | static LPoint g_render_points[1024]; | 16 | static LPoint g_render_points[1024]; |
16 | static int g_render_point_count; | 17 | static int g_render_point_count; |
@@ -32,9 +33,14 @@ engine_redraw() | |||
32 | display_clear(); | 33 | display_clear(); |
33 | display_getdimensions(&MAX_X, &MAX_Y, &FONT_HEIGHT); | 34 | display_getdimensions(&MAX_X, &MAX_Y, &FONT_HEIGHT); |
34 | 35 | ||
35 | snprintf( text, sizeof(text), g_harfe_connected ? "online (%s)" : "offline (%s)", config_hints[(int)g_config_source]); | 36 | if (!g_importing_config) |
37 | snprintf( text, sizeof(text), g_harfe_connected ? "online (%s)" : "offline (%s)", config_hints[(int)g_config_source]); | ||
38 | else | ||
39 | snprintf( text, sizeof(text), "importing config (%s)", config_hints[(int)g_config_source]); | ||
36 | display_text(text, 8, MAX_Y - 4, g_harfe_connected ? 0x00ff3fff : 0xff003fff ); | 40 | display_text(text, 8, MAX_Y - 4, g_harfe_connected ? 0x00ff3fff : 0xff003fff ); |
37 | 41 | ||
42 | menu_redraw(); | ||
43 | |||
38 | if (height) { | 44 | if (height) { |
39 | int b = g_midi_three_octave_split_inverse; | 45 | int b = g_midi_three_octave_split_inverse; |
40 | display_text( b ? "+1" : "-1", 4, scale(g_min_y + tos1 * height / 200) + FONT_HEIGHT / 2, 0x007f7f7fff); | 46 | display_text( b ? "+1" : "-1", 4, scale(g_min_y + tos1 * height / 200) + FONT_HEIGHT / 2, 0x007f7f7fff); |
@@ -132,7 +138,11 @@ engine_select_config(ConfigSelect sel) { | |||
132 | l->p1.y = g_max_y; | 138 | l->p1.y = g_max_y; |
133 | } | 139 | } |
134 | } | 140 | } |
135 | } | 141 | menu_setmode(0x17, 0); |
142 | } else | ||
143 | if (!g_string_count || menu_setmode(0x17, 4)) | ||
144 | return; | ||
145 | |||
136 | g_selected_config = sel; | 146 | g_selected_config = sel; |
137 | } | 147 | } |
138 | 148 | ||