diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-04-03 13:48:52 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-09-25 11:05:59 +0100 |
commit | e4aec7d648de2553653b378518b5e90f29aeeac3 (patch) | |
tree | 37c1f0f542742032573d1a99cc4b68c061fedb10 /apps/core_keymap.h | |
parent | f47aa584a8b447d8225fc5b09afb2d1fe6764c1d (diff) | |
download | rockbox-e4aec7d648de2553653b378518b5e90f29aeeac3.tar.gz rockbox-e4aec7d648de2553653b378518b5e90f29aeeac3.zip |
key remap: simplify and use movable allocations
Have action.c control the key remap buflib allocation so that it can
be made movable. With memory management offloaded, core_keymap.c only
needs to deal with loading keymap files. Simplify the code there and
use buflib pinning so the file can be loaded directly into the buffer.
Change-Id: Ia654cc05ce6b286f96c1031fa4f7d4b3859a2c1a
Diffstat (limited to 'apps/core_keymap.h')
-rw-r--r-- | apps/core_keymap.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/apps/core_keymap.h b/apps/core_keymap.h index dad9875364..2077daa685 100644 --- a/apps/core_keymap.h +++ b/apps/core_keymap.h | |||
@@ -34,13 +34,6 @@ | |||
34 | /* Allocates core buffer, copies keymap to allow buttons for actions to be remapped*/ | 34 | /* Allocates core buffer, copies keymap to allow buttons for actions to be remapped*/ |
35 | int core_set_keyremap(struct button_mapping* core_keymap, int count); | 35 | int core_set_keyremap(struct button_mapping* core_keymap, int count); |
36 | 36 | ||
37 | /* open_key_remap(filename , *fd (you must close file_descriptor), *fsize) | ||
38 | * checks/strips header and returns remaining count | ||
39 | * fd is opened and set to first record | ||
40 | * filesize contains the size of the remaining records | ||
41 | */ | ||
42 | int open_key_remap(const char *filename, int *fd, size_t *filesize); | ||
43 | |||
44 | /* load a remap file to allow buttons for actions to be remapped */ | 37 | /* load a remap file to allow buttons for actions to be remapped */ |
45 | int core_load_key_remap(const char *filename); | 38 | int core_load_key_remap(const char *filename); |
46 | 39 | ||