]> icculus.org git repositories - btb/d2x.git/blob - arch/svgalib/key_arch.c
copied files from d1x
[btb/d2x.git] / arch / svgalib / key_arch.c
1 /// SDL keyboard input support
2
3 #include <stdio.h>
4 #include <stdlib.h>
5
6 #include <vgakeyboard.h>
7
8 #include "error.h"
9 #include "event.h"
10 #include "key.h"
11
12 void key_handler(int scancode, int press)
13 {
14         generic_key_handler(scancode,press);
15 }
16
17 void arch_key_close(void)
18 {
19         keyboard_close();
20 }
21
22 void arch_key_init(void)
23 {
24         if (keyboard_init())
25                 Error ("SVGAlib Keyboard Init Failed");
26
27         keyboard_seteventhandler (key_handler);
28         //keyd_fake_repeat = 1;
29 }
30
31 void arch_key_flush(void)
32 {
33 }
34
35 void arch_key_poll(void)
36 {
37         event_poll();
38 }