aboutsummaryrefslogtreecommitdiffstats
path: root/com32
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-06 00:46:55 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-06 00:46:55 -0700
commit39d77623ff752ca394a8fa2ebc0219f41060a488 (patch)
tree2a1c6785bd02c0677042efc28f2b28fbd346fda5 /com32
parent3e9ec4717294880748f41d973db4b807471bca66 (diff)
downloadsyslinux-39d77623ff752ca394a8fa2ebc0219f41060a488.tar.gz
syslinux-39d77623ff752ca394a8fa2ebc0219f41060a488.tar.xz
syslinux-39d77623ff752ca394a8fa2ebc0219f41060a488.zip
hdt: fix build due to cmenu keyboard changes
Sames changes as the ones needed on the cmenu examples. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32')
-rw-r--r--com32/hdt/hdt-menu.c6
-rw-r--r--com32/hdt/hdt-menu.h3
2 files changed, 5 insertions, 4 deletions
diff --git a/com32/hdt/hdt-menu.c b/com32/hdt/hdt-menu.c
index 55031d67..894a7d18 100644
--- a/com32/hdt/hdt-menu.c
+++ b/com32/hdt/hdt-menu.c
@@ -85,18 +85,18 @@ TIMEOUTCODE ontimeout()
}
/* Keyboard handler for the menu system */
-void keys_handler(t_menuitem * mi, unsigned int scancode)
+void keys_handler(t_menusystem * ms __attribute__ (( unused )), t_menuitem * mi, int scancode)
{
int nr, nc;
- if ((scancode >> 8) == F1) { // If scancode of F1
+ if (scancode == KEY_F1) { // If scancode of F1
runhelpsystem(mi->helpid);
}
/*
* If user hit TAB, and item is an "executable" item
* and user has privileges to edit it, edit it in place.
*/
- if (((scancode & 0xFF) == 0x09) && (mi->action == OPT_RUN)) {
+ if ((scancode == KEY_TAB) && (mi->action == OPT_RUN)) {
//(isallowed(username,"editcmd") || isallowed(username,"root"))) {
if (getscreensize(1, &nr, &nc)) {
/* Unknown screen size? */
diff --git a/com32/hdt/hdt-menu.h b/com32/hdt/hdt-menu.h
index 061fa680..f715ed0a 100644
--- a/com32/hdt/hdt-menu.h
+++ b/com32/hdt/hdt-menu.h
@@ -29,6 +29,7 @@
#ifndef DEFINE_HDT_MENU_H
#define DEFINE_HDT_MENU_H
#include <stdio.h>
+#include <getkey.h>
#include "menu.h"
#include "help.h"
@@ -82,7 +83,7 @@ struct s_hdt_menu {
};
TIMEOUTCODE ontimeout();
-void keys_handler(t_menuitem * mi, unsigned int scancode);
+void keys_handler(t_menusystem * ms __attribute__ (( unused )), t_menuitem * mi, int scancode);
// PCI Stuff
int compute_PCI(struct s_hdt_menu *hdt_menu, struct s_hardware *hardware);