diff options
author | William Wilgus <wilgus.william@gmail.com> | 2020-07-21 02:33:53 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2020-07-22 06:48:28 -0400 |
commit | cb94b3ae2ee7a66845895e2c704cdf62ee74ba13 (patch) | |
tree | 0b2da61e3d513fdc37d18f075b6c079e85165781 /apps/radio/presets.c | |
parent | a5df94beb5cd7fd87828b9532b4a1a4da13ef774 (diff) | |
download | rockbox-cb94b3ae2ee7a66845895e2c704cdf62ee74ba13.tar.gz rockbox-cb94b3ae2ee7a66845895e2c704cdf62ee74ba13.zip |
keyboard add ability to specify temporary custom layouts
rb core allows you to load custom keyboard layouts
this patch adds the ability to load a keyboard layout in a buffer
the custom layout is temporary and does not overwrite the current layout
use like so:
unsigned short kbd[64];
unsigned short *kbd_p = kbd;
if (!kbd_create_layout("ABCD1234\n", kbd, sizeof(kbd)))
kbd_p = NULL;
rb->kbd_input(buf,sizeof(buf), kbd_p);
Change-Id: I7be2bd4a1b4797a147fa70228a9749dc56ac052a
Diffstat (limited to 'apps/radio/presets.c')
-rw-r--r-- | apps/radio/presets.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/radio/presets.c b/apps/radio/presets.c index 98a33d14ad..acd6dc8711 100644 --- a/apps/radio/presets.c +++ b/apps/radio/presets.c | |||
@@ -277,7 +277,7 @@ int handle_radio_add_preset(void) | |||
277 | { | 277 | { |
278 | buf[0] = '\0'; | 278 | buf[0] = '\0'; |
279 | 279 | ||
280 | if (!kbd_input(buf, MAX_FMPRESET_LEN + 1)) | 280 | if (!kbd_input(buf, MAX_FMPRESET_LEN + 1, NULL)) |
281 | { | 281 | { |
282 | struct fmstation * const fms = &presets[num_presets]; | 282 | struct fmstation * const fms = &presets[num_presets]; |
283 | strcpy(fms->name, buf); | 283 | strcpy(fms->name, buf); |
@@ -307,7 +307,7 @@ static int radio_edit_preset(void) | |||
307 | 307 | ||
308 | strcpy(buf, fms->name); | 308 | strcpy(buf, fms->name); |
309 | 309 | ||
310 | if (!kbd_input(buf, MAX_FMPRESET_LEN + 1)) | 310 | if (!kbd_input(buf, MAX_FMPRESET_LEN + 1, NULL)) |
311 | { | 311 | { |
312 | strcpy(fms->name, buf); | 312 | strcpy(fms->name, buf); |
313 | presets_changed = true; | 313 | presets_changed = true; |
@@ -372,7 +372,7 @@ int preset_list_save(void) | |||
372 | 372 | ||
373 | while(bad_file_name) | 373 | while(bad_file_name) |
374 | { | 374 | { |
375 | if(!kbd_input(filepreset, sizeof(filepreset))) | 375 | if(!kbd_input(filepreset, sizeof(filepreset), NULL)) |
376 | { | 376 | { |
377 | /* check the name: max MAX_FILENAME (20) chars */ | 377 | /* check the name: max MAX_FILENAME (20) chars */ |
378 | char* p2; | 378 | char* p2; |