fix corruption on empty sel_fname
[libpicofe.git] / gp2x / in_gp2x.c
index 196f121..4599a3e 100644 (file)
@@ -1,3 +1,14 @@
+/*
+ * (C) GraÅžvydas "notaz" Ignotas, 2006-2012
+ *
+ * This work is licensed under the terms of any of these licenses
+ * (at your option):
+ *  - GNU GPL, version 2 or later.
+ *  - GNU LGPL, version 2.1 or later.
+ *  - MAME license.
+ * See the COPYING file in the top-level directory.
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
 
-#include "../common/input.h"
+#include "../input.h"
 #include "in_gp2x.h"
 
 #define IN_GP2X_PREFIX "gp2x:"
 #define IN_GP2X_NBUTTONS 32
 
-/* note: in_gp2x hadles combos (if 2 btns have the same bind,
+/* note: in_gp2x handles combos (if 2 btns have the same bind,
  * both must be pressed for action to happen) */
 static int in_gp2x_combo_keys = 0;
 static int in_gp2x_combo_acts = 0;
@@ -197,7 +208,7 @@ static const struct {
 
 #define KEY_PBTN_MAP_SIZE (sizeof(key_pbtn_map) / sizeof(key_pbtn_map[0]))
 
-static int in_gp2x_menu_translate(void *drv_data, int keycode)
+static int in_gp2x_menu_translate(void *drv_data, int keycode, char *charcode)
 {
        int i;
        if (keycode < 0)