From e4aec7d648de2553653b378518b5e90f29aeeac3 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sun, 3 Apr 2022 13:48:52 +0100 Subject: 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 --- apps/core_keymap.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'apps/core_keymap.h') 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 @@ /* Allocates core buffer, copies keymap to allow buttons for actions to be remapped*/ int core_set_keyremap(struct button_mapping* core_keymap, int count); -/* open_key_remap(filename , *fd (you must close file_descriptor), *fsize) - * checks/strips header and returns remaining count - * fd is opened and set to first record - * filesize contains the size of the remaining records -*/ -int open_key_remap(const char *filename, int *fd, size_t *filesize); - /* load a remap file to allow buttons for actions to be remapped */ int core_load_key_remap(const char *filename); -- cgit v1.2.3