Restore software rotation

Fixes: #26
This commit is contained in:
Johannes Marbach
2024-03-21 14:27:20 +01:00
parent 7285fb9e04
commit 785e831063
5 changed files with 25 additions and 27 deletions

View File

@@ -6,6 +6,8 @@
#include "sq2lv.h"
#include <string.h>
/**
* Static variables
@@ -214,7 +216,7 @@ int *sq2lv_get_modifier_indexes(lv_obj_t *keyboard, int *num_modifiers) {
}
#if SQ2LV_SCANCODES_ENABLED
int *sq2lv_get_scancodes(lv_obj_t *keyboard, uint16_t btn_id, int *num_scancodes) {
const int * const sq2lv_get_scancodes(lv_obj_t *keyboard, uint16_t btn_id, int *num_scancodes) {
if (current_layout_id < 0 || current_layout_id >= sq2lv_num_layouts) {
*num_scancodes = 0;
return NULL;

View File

@@ -70,7 +70,7 @@ int *sq2lv_get_modifier_indexes(lv_obj_t *keyboard, int *num_modifiers);
* @param num_scancodes pointer to an integer into which the number of scancodes will be written
* @return pointer into an array of scancodes at the appropriate index
*/
int *sq2lv_get_scancodes(lv_obj_t *keyboard, uint16_t btn_id, int *num_scancodes);
const int * const sq2lv_get_scancodes(lv_obj_t *keyboard, uint16_t btn_id, int *num_scancodes);
#endif /* SQ2LV_SCANCODES_ENABLED */
#endif /* SQ2LV_H */