Просмотр исходного кода

Fix settings key press handling.

antirez 3 лет назад
Родитель
Сommit
6cd2b34fe9
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      view_settings.c

+ 2 - 1
view_settings.c

@@ -38,7 +38,8 @@ void render_view_settings(Canvas *const canvas, ProtoViewApp *app) {
 void process_input_settings(ProtoViewApp *app, InputEvent input) {
     /* Here we handle only up and down. Avoid any work if the user
      * pressed something else. */
-    if (input.key != InputKeyDown && input.key != InputKeyUp) return;
+    if (input.type != InputTypePress ||
+        (input.key != InputKeyDown && input.key != InputKeyUp)) return;
 
     if (app->current_view == ViewFrequencySettings) {
         size_t curidx = 0, i;