Compare commits
3 commits
47d9826a0a
...
85c7b08825
Author | SHA1 | Date | |
---|---|---|---|
|
85c7b08825 | ||
|
9c0678a291 | ||
|
a587942305 |
8 changed files with 39 additions and 10 deletions
|
@ -6,6 +6,7 @@
|
||||||
CHANGE: Added type gImage to replace V2.x gdispImage
|
CHANGE: Added type gImage to replace V2.x gdispImage
|
||||||
FIX: Fixed GWIN console widget scroll
|
FIX: Fixed GWIN console widget scroll
|
||||||
FIX: A warning and adjusted is made if GDISP_IMAGE_BMP_BLIT_BUFFER_SIZE is less than 40 bytes.
|
FIX: A warning and adjusted is made if GDISP_IMAGE_BMP_BLIT_BUFFER_SIZE is less than 40 bytes.
|
||||||
|
FIX: Prevent compiler warnings on duplicate const specifiers.
|
||||||
|
|
||||||
|
|
||||||
*** Release 2.9 ***
|
*** Release 2.9 ***
|
||||||
|
|
|
@ -99,7 +99,11 @@
|
||||||
static gBool Win32MouseInit(GMouse *m, unsigned driverinstance);
|
static gBool Win32MouseInit(GMouse *m, unsigned driverinstance);
|
||||||
static gBool Win32MouseRead(GMouse *m, GMouseReading *prd);
|
static gBool Win32MouseRead(GMouse *m, GMouseReading *prd);
|
||||||
|
|
||||||
const GMouseVMT const GMOUSE_DRIVER_VMT[1] = {{
|
/**
|
||||||
|
* This should be: const GMouseVMT const GMOUSE_DRIVER_VMT[1] = {{
|
||||||
|
* However, some major compilers complain about the duplicate const specifier even though this is perfectly valid standard C.
|
||||||
|
*/
|
||||||
|
const GMouseVMT GMOUSE_DRIVER_VMT[1] = {{
|
||||||
{
|
{
|
||||||
GDRIVER_TYPE_MOUSE,
|
GDRIVER_TYPE_MOUSE,
|
||||||
GMOUSE_VFLG_NOPOLL|GMOUSE_VFLG_DYNAMICONLY,
|
GMOUSE_VFLG_NOPOLL|GMOUSE_VFLG_DYNAMICONLY,
|
||||||
|
@ -885,7 +889,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
|
||||||
// Create the associated mouse
|
// Create the associated mouse
|
||||||
#if GFX_USE_GINPUT && GINPUT_NEED_MOUSE
|
#if GFX_USE_GINPUT && GINPUT_NEED_MOUSE
|
||||||
priv->mouseenabled = hWndParent ? gFalse : gTrue;
|
priv->mouseenabled = hWndParent ? gFalse : gTrue;
|
||||||
priv->mouse = (GMouse *)gdriverRegister((const GDriverVMT const *)GMOUSE_DRIVER_VMT, g);
|
priv->mouse = (GMouse *)gdriverRegister((const GDriverVMT*)GMOUSE_DRIVER_VMT, g);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sprintf(buf, APP_NAME " - %u", g->systemdisplay+1);
|
sprintf(buf, APP_NAME " - %u", g->systemdisplay+1);
|
||||||
|
|
|
@ -574,7 +574,7 @@ void _gdispInit(void)
|
||||||
#elif GDISP_TOTAL_DISPLAYS > 1
|
#elif GDISP_TOTAL_DISPLAYS > 1
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
extern const GDISPVMT const GDISPVMT_OnlyOne[1];
|
extern const GDISPVMT GDISPVMT_OnlyOne[1];
|
||||||
|
|
||||||
if (!(GDISPVMT_OnlyOne->d.flags & GDISP_VFLG_DYNAMICONLY)) {
|
if (!(GDISPVMT_OnlyOne->d.flags & GDISP_VFLG_DYNAMICONLY)) {
|
||||||
for(i = 0; i < GDISP_TOTAL_DISPLAYS; i++)
|
for(i = 0; i < GDISP_TOTAL_DISPLAYS; i++)
|
||||||
|
@ -583,7 +583,7 @@ void _gdispInit(void)
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
extern const GDISPVMT const GDISPVMT_OnlyOne[1];
|
extern const GDISPVMT GDISPVMT_OnlyOne[1];
|
||||||
|
|
||||||
if (!(GDISPVMT_OnlyOne->d.flags & GDISP_VFLG_DYNAMICONLY))
|
if (!(GDISPVMT_OnlyOne->d.flags & GDISP_VFLG_DYNAMICONLY))
|
||||||
gdriverRegister(&GDISPVMT_OnlyOne->d, 0);
|
gdriverRegister(&GDISPVMT_OnlyOne->d, 0);
|
||||||
|
|
|
@ -732,7 +732,11 @@ typedef struct GDISPVMT {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Build the VMT
|
// Build the VMT
|
||||||
const GDISPVMT const GDISP_DRIVER_VMT[1] = {{
|
/*
|
||||||
|
* This should read: const GDISPVMT const GDISP_DRIVER_VMT[1] = {{
|
||||||
|
* However, some major C compilers complain about duplicate const specifiers although this is perfectly valid standard C.
|
||||||
|
*/
|
||||||
|
const GDISPVMT GDISP_DRIVER_VMT[1] = {{
|
||||||
{ GDRIVER_TYPE_DISPLAY, 0, sizeof(GDisplay), _gdispInitDriver, _gdispPostInitDriver, _gdispDeInitDriver },
|
{ GDRIVER_TYPE_DISPLAY, 0, sizeof(GDisplay), _gdispInitDriver, _gdispPostInitDriver, _gdispDeInitDriver },
|
||||||
gdisp_lld_init,
|
gdisp_lld_init,
|
||||||
#if GDISP_HARDWARE_DEINIT
|
#if GDISP_HARDWARE_DEINIT
|
||||||
|
|
|
@ -86,8 +86,16 @@ typedef struct GDriverVMT {
|
||||||
* const GDriverVMT const * mylist = { DRIVER_LIST };
|
* const GDriverVMT const * mylist = { DRIVER_LIST };
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
|
* @note This could be one single typedef. However, some major compilers complain about duplicate const specifiers even though this is perfectly
|
||||||
|
* valid standard C. As this problem has become worse over time we opt for splitting this into two separate typedefs to prevent these
|
||||||
|
* compilers from throwing warnings.
|
||||||
|
* The single typedef would look like this:
|
||||||
|
* <code>
|
||||||
|
* typedef const struct GDriverVMT const GDriverVMTList[1];
|
||||||
|
* </code>
|
||||||
*/
|
*/
|
||||||
typedef const struct GDriverVMT const GDriverVMTList[1];
|
typedef const struct GDriverVMT ConstGDriverVMT;
|
||||||
|
typedef ConstGDriverVMT const GDriverVMTList[1];
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
|
|
|
@ -36,8 +36,11 @@
|
||||||
/**
|
/**
|
||||||
* The order of the file-systems below determines the order
|
* The order of the file-systems below determines the order
|
||||||
* that they are searched to find a file.
|
* that they are searched to find a file.
|
||||||
|
*
|
||||||
|
* This should read: static const GFILEVMT const * FsArray[] = {
|
||||||
|
* However, some major C compilers complain about duplicate const specifiers although this is perfectly valid standard C.
|
||||||
*/
|
*/
|
||||||
static const GFILEVMT const * FsArray[] = {
|
static const GFILEVMT* FsArray[] = {
|
||||||
#if GFILE_NEED_USERFS
|
#if GFILE_NEED_USERFS
|
||||||
&FsUSERVMT,
|
&FsUSERVMT,
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -34,7 +34,12 @@ typedef struct ROMFS_DIRENTRY {
|
||||||
|
|
||||||
#define ROMFS_DIRENTRY_HEAD 0
|
#define ROMFS_DIRENTRY_HEAD 0
|
||||||
#include "romfs_files.h"
|
#include "romfs_files.h"
|
||||||
static const ROMFS_DIRENTRY const *FsROMHead = ROMFS_DIRENTRY_HEAD;
|
|
||||||
|
/*
|
||||||
|
* This should be: static const ROMFS_DIRENTRY const *FsROMHead = ROMFS_DIRENTRY_HEAD;
|
||||||
|
* However, some major compilers complain about the duplicate const specifier even though this is perfectly valid standard C.
|
||||||
|
*/
|
||||||
|
static const ROMFS_DIRENTRY *FsROMHead = ROMFS_DIRENTRY_HEAD;
|
||||||
|
|
||||||
typedef struct ROMFileList {
|
typedef struct ROMFileList {
|
||||||
gfileList fl;
|
gfileList fl;
|
||||||
|
|
|
@ -663,7 +663,11 @@ void _gmouseInit(void) {
|
||||||
// One and only one mouse
|
// One and only one mouse
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
extern const GMouseVMT const GMOUSEVMT_OnlyOne[1];
|
/*
|
||||||
|
* This should be: extern const GMouseVMT const GMOUSEVMT_OnlyOne[1];
|
||||||
|
* However, some major compilers complain about the duplicate const specifier even though this is perfectly valid standard C.
|
||||||
|
*/
|
||||||
|
extern const GMouseVMT GMOUSEVMT_OnlyOne[1];
|
||||||
|
|
||||||
if (!(GMOUSEVMT_OnlyOne->d.flags & GMOUSE_VFLG_DYNAMICONLY))
|
if (!(GMOUSEVMT_OnlyOne->d.flags & GMOUSE_VFLG_DYNAMICONLY))
|
||||||
gdriverRegister(&GMOUSEVMT_OnlyOne->d, GDISP);
|
gdriverRegister(&GMOUSEVMT_OnlyOne->d, GDISP);
|
||||||
|
|
Loading…
Add table
Reference in a new issue