diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-11-26 13:01:47 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-11-26 13:02:47 +1000 |
commit | bd3a58ccfc0a484e18cd562539edc71c2f8ebefc (patch) | |
tree | 46b7f6ce86eb194df8d2a72928d4bffb04ce0bf7 /src/ginput/ginput_mouse.c | |
parent | 746527632c1fd6a35f23c828a2bb392bcfc1659a (diff) | |
download | uGFX-bd3a58ccfc0a484e18cd562539edc71c2f8ebefc.tar.gz uGFX-bd3a58ccfc0a484e18cd562539edc71c2f8ebefc.tar.bz2 uGFX-bd3a58ccfc0a484e18cd562539edc71c2f8ebefc.zip |
Fix some extern structure definitions that cause problems with some compilers
Diffstat (limited to 'src/ginput/ginput_mouse.c')
-rw-r--r-- | src/ginput/ginput_mouse.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ginput/ginput_mouse.c b/src/ginput/ginput_mouse.c index e6741b76..4a1906ec 100644 --- a/src/ginput/ginput_mouse.c +++ b/src/ginput/ginput_mouse.c @@ -623,28 +623,30 @@ static void MousePoll(void *param) { } #endif +typedef const GMouseVMT const GMOUSEVMTLIST[]; + void _gmouseInit(void) { // GINPUT_MOUSE_DRIVER_LIST is defined - create each driver instance #if defined(GINPUT_MOUSE_DRIVER_LIST) { int i; - extern GDriverVMTList GINPUT_MOUSE_DRIVER_LIST; - static const struct GDriverVMT const * dclist[] = {GINPUT_MOUSE_DRIVER_LIST}; + extern GMOUSEVMTLIST GINPUT_MOUSE_DRIVER_LIST; + static GMOUSEVMTLIST dclist[] = {GINPUT_MOUSE_DRIVER_LIST}; for(i = 0; i < sizeof(dclist)/sizeof(dclist[0]); i++) { - if (!(dclist[i]->flags & GMOUSE_VFLG_DYNAMICONLY)) - gdriverRegister(dclist[i], GDISP); + if (!(dclist[i]->d.flags & GMOUSE_VFLG_DYNAMICONLY)) + gdriverRegister(&dclist[i]->d, GDISP); } } // One and only one mouse #else { - extern GDriverVMTList GMOUSEVMT_OnlyOne; + extern GMOUSEVMTLIST GMOUSEVMT_OnlyOne; - if (!(GMOUSEVMT_OnlyOne->flags & GMOUSE_VFLG_DYNAMICONLY)) - gdriverRegister(GMOUSEVMT_OnlyOne, GDISP); + if (!(GMOUSEVMT_OnlyOne->d.flags & GMOUSE_VFLG_DYNAMICONLY)) + gdriverRegister(&GMOUSEVMT_OnlyOne->d, GDISP); } #endif |