Fix some extern structure definitions that cause problems with some compilers
This commit is contained in:
parent
746527632c
commit
bd3a58ccfc
2 changed files with 16 additions and 12 deletions
|
@ -561,6 +561,8 @@ static void line_clip(GDisplay *g) {
|
||||||
/* Driver exported functions. */
|
/* Driver exported functions. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
typedef const GDISPVMT const GDISPVMTLIST[];
|
||||||
|
|
||||||
void _gdispInit(void)
|
void _gdispInit(void)
|
||||||
{
|
{
|
||||||
// GDISP_DRIVER_LIST is defined - create each driver instance
|
// GDISP_DRIVER_LIST is defined - create each driver instance
|
||||||
|
@ -568,19 +570,19 @@ void _gdispInit(void)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
extern GDriverVMTList GDISP_DRIVER_LIST;
|
extern GDISPVMTLIST GDISP_DRIVER_LIST;
|
||||||
static const struct GDriverVMT const * dclist[] = {GDISP_DRIVER_LIST};
|
static GDISPVMTLIST dclist[] = {GDISP_DRIVER_LIST};
|
||||||
|
|
||||||
for(i = 0; i < sizeof(dclist)/sizeof(dclist[0]); i++)
|
for(i = 0; i < sizeof(dclist)/sizeof(dclist[0]); i++)
|
||||||
gdriverRegister(dclist[i], 0);
|
gdriverRegister(&dclist[i]->d, 0);
|
||||||
}
|
}
|
||||||
#elif GDISP_TOTAL_DISPLAYS > 1
|
#elif GDISP_TOTAL_DISPLAYS > 1
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
extern GDriverVMTList GDISPVMT_OnlyOne;
|
extern GDISPVMTLIST GDISPVMT_OnlyOne;
|
||||||
|
|
||||||
for(i = 0; i < GDISP_TOTAL_DISPLAYS; i++)
|
for(i = 0; i < GDISP_TOTAL_DISPLAYS; i++)
|
||||||
gdriverRegister(GDISPVMT_OnlyOne, 0);
|
gdriverRegister(&GDISPVMT_OnlyOne->d, 0);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
|
|
|
@ -623,28 +623,30 @@ static void MousePoll(void *param) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef const GMouseVMT const GMOUSEVMTLIST[];
|
||||||
|
|
||||||
void _gmouseInit(void) {
|
void _gmouseInit(void) {
|
||||||
// GINPUT_MOUSE_DRIVER_LIST is defined - create each driver instance
|
// GINPUT_MOUSE_DRIVER_LIST is defined - create each driver instance
|
||||||
#if defined(GINPUT_MOUSE_DRIVER_LIST)
|
#if defined(GINPUT_MOUSE_DRIVER_LIST)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
extern GDriverVMTList GINPUT_MOUSE_DRIVER_LIST;
|
extern GMOUSEVMTLIST GINPUT_MOUSE_DRIVER_LIST;
|
||||||
static const struct GDriverVMT const * dclist[] = {GINPUT_MOUSE_DRIVER_LIST};
|
static GMOUSEVMTLIST dclist[] = {GINPUT_MOUSE_DRIVER_LIST};
|
||||||
|
|
||||||
for(i = 0; i < sizeof(dclist)/sizeof(dclist[0]); i++) {
|
for(i = 0; i < sizeof(dclist)/sizeof(dclist[0]); i++) {
|
||||||
if (!(dclist[i]->flags & GMOUSE_VFLG_DYNAMICONLY))
|
if (!(dclist[i]->d.flags & GMOUSE_VFLG_DYNAMICONLY))
|
||||||
gdriverRegister(dclist[i], GDISP);
|
gdriverRegister(&dclist[i]->d, GDISP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// One and only one mouse
|
// One and only one mouse
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
extern GDriverVMTList GMOUSEVMT_OnlyOne;
|
extern GMOUSEVMTLIST GMOUSEVMT_OnlyOne;
|
||||||
|
|
||||||
if (!(GMOUSEVMT_OnlyOne->flags & GMOUSE_VFLG_DYNAMICONLY))
|
if (!(GMOUSEVMT_OnlyOne->d.flags & GMOUSE_VFLG_DYNAMICONLY))
|
||||||
gdriverRegister(GMOUSEVMT_OnlyOne, GDISP);
|
gdriverRegister(&GMOUSEVMT_OnlyOne->d, GDISP);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue