git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://cadel.mutabah.net/acess2
[tpg/acess2.git]
/
KernelLand
/
Modules
/
Input
/
Keyboard
/
main.c
diff --git
a/KernelLand/Modules/Input/Keyboard/main.c
b/KernelLand/Modules/Input/Keyboard/main.c
index
49e7777
..
9c2e20e
100644
(file)
--- a/
KernelLand/Modules/Input/Keyboard/main.c
+++ b/
KernelLand/Modules/Input/Keyboard/main.c
@@
-29,7
+29,7
@@
extern void Heap_Stats(void);
// === PROTOTYPES ===
int Keyboard_Install(char **Arguments);
// === PROTOTYPES ===
int Keyboard_Install(char **Arguments);
-
void
Keyboard_Cleanup(void);
+
int
Keyboard_Cleanup(void);
// - Internal
tKeymap *Keyboard_LoadMap(const char *Name);
void Keyboard_FreeMap(tKeymap *Keymap);
// - Internal
tKeymap *Keyboard_LoadMap(const char *Name);
void Keyboard_FreeMap(tKeymap *Keymap);
@@
-68,9
+68,10
@@
int Keyboard_Install(char **Arguments)
/**
* \brief Pre-unload cleanup function
*/
/**
* \brief Pre-unload cleanup function
*/
-
void
Keyboard_Cleanup(void)
+
int
Keyboard_Cleanup(void)
{
// TODO: Do I need this?
{
// TODO: Do I need this?
+ return 0;
}
// --- Map Management ---
}
// --- Map Management ---
@@
-163,6
+164,15
@@
void Keyboard_HandleKey(tKeyboard *Source, Uint32 HIDKeySym)
Uint32 flag;
Uint8 layer;
Uint32 flag;
Uint8 layer;
+ if( !Source ) {
+ Log_Error("Keyboard", "Passed NULL handle");
+ return ;
+ }
+ if( !Source->Node ) {
+ Log_Error("Keyboard", "Passed handle with NULL node");
+ return ;
+ }
+
bPressed = !(HIDKeySym & (1 << 31));
HIDKeySym &= 0x7FFFFFFF;
bPressed = !(HIDKeySym & (1 << 31));
HIDKeySym &= 0x7FFFFFFF;
UCC
git Repository :: git.ucc.asn.au