aboutsummaryrefslogtreecommitdiffstats
path: root/src/ginput/ginput_keyboard.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2015-01-27 13:42:11 +1000
committerinmarket <andrewh@inmarket.com.au>2015-01-27 13:42:11 +1000
commitadebde7a9959aa6414e1599847edea63feb81159 (patch)
tree7177d65f642947b2494ea70c2d01fb242de42d64 /src/ginput/ginput_keyboard.c
parentb9f53aa7936686134f19c480346816a3d234f7f7 (diff)
downloaduGFX-adebde7a9959aa6414e1599847edea63feb81159.tar.gz
uGFX-adebde7a9959aa6414e1599847edea63feb81159.tar.bz2
uGFX-adebde7a9959aa6414e1599847edea63feb81159.zip
Fix multiple display/keyboard/mouse problem with some compilers.
Diffstat (limited to 'src/ginput/ginput_keyboard.c')
-rw-r--r--src/ginput/ginput_keyboard.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ginput/ginput_keyboard.c b/src/ginput/ginput_keyboard.c
index eac2e9e0..cdbe52a6 100644
--- a/src/ginput/ginput_keyboard.c
+++ b/src/ginput/ginput_keyboard.c
@@ -457,16 +457,15 @@ static void KeyboardPoll(void *param) {
}
}
-typedef const GKeyboardVMT const GKEYBOARDVMTLIST[];
-
void _gkeyboardInit(void) {
// GINPUT_KEYBOARD_DRIVER_LIST is defined - create each driver instance
#if defined(GINPUT_KEYBOARD_DRIVER_LIST)
{
int i;
+ typedef const GKeyboardVMT const GKEYBOARDVMTLIST[1];
- extern GKEYBOARDVMTLIST GINPUT_KEYBOARD_DRIVER_LIST;
- static GKEYBOARDVMTLIST dclist[] = {GINPUT_KEYBOARD_DRIVER_LIST};
+ extern GKEYBOARDVMTLIST GINPUT_KEYBOARD_DRIVER_LIST;
+ static const GKeyboardVMT * const dclist[] = {GINPUT_KEYBOARD_DRIVER_LIST};
for(i = 0; i < sizeof(dclist)/sizeof(dclist[0]); i++) {
if (!(dclist[i]->d.flags & GKEYBOARD_VFLG_DYNAMICONLY))
@@ -477,7 +476,7 @@ void _gkeyboardInit(void) {
// One and only one mouse
#else
{
- extern GKEYBOARDVMTLIST GKEYBOARDVMT_OnlyOne;
+ extern const GKeyboardVMT const GKEYBOARDVMT_OnlyOne[1];
if (!(GKEYBOARDVMT_OnlyOne->d.flags & GKEYBOARD_VFLG_DYNAMICONLY))
gdriverRegister(&GKEYBOARDVMT_OnlyOne->d, 0);