Re #307 Fixed GCC warning about a possible crash when calling help menu when no keyboard shortcut is defined
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4699 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 7b555242b91228ecefcb7608115272d515f0fa49 Former-commit-id: b50e9d0d75457d763c7a639c7c06feccd0f34573
This commit is contained in:
parent
671eec41f7
commit
2df69cbda5
1 changed files with 36 additions and 36 deletions
|
@ -92,44 +92,44 @@ GfuiHelpScreen(void *targetScreen, void *returnScreen)
|
|||
tGfuiScreen *pscrTgt = (tGfuiScreen*)targetScreen;
|
||||
|
||||
tGfuiKey *curKey = pscrTgt->userKeys;
|
||||
do {
|
||||
while (curKey)
|
||||
{
|
||||
curKey = curKey->next;
|
||||
|
||||
// Decide if this key goes on the left of right column.
|
||||
bool bLeft;
|
||||
if (curKey) {
|
||||
curKey = curKey->next;
|
||||
switch(curKey->key) {
|
||||
case GFUIK_BACKSPACE:
|
||||
case GFUIK_F1:
|
||||
case GFUIK_F2:
|
||||
case GFUIK_F3:
|
||||
case GFUIK_F4:
|
||||
case GFUIK_F5:
|
||||
case GFUIK_F6:
|
||||
case GFUIK_F7:
|
||||
case GFUIK_F8:
|
||||
case GFUIK_F9:
|
||||
case GFUIK_F10:
|
||||
case GFUIK_F11:
|
||||
case GFUIK_F12:
|
||||
case GFUIK_LEFT:
|
||||
case GFUIK_UP:
|
||||
case GFUIK_RIGHT:
|
||||
case GFUIK_DOWN:
|
||||
case GFUIK_PAGEUP:
|
||||
case GFUIK_PAGEDOWN:
|
||||
case GFUIK_HOME:
|
||||
case GFUIK_END:
|
||||
case GFUIK_INSERT:
|
||||
case GFUIK_DELETE:
|
||||
case GFUIK_CLEAR:
|
||||
case GFUIK_PAUSE:
|
||||
bLeft = true;
|
||||
break;
|
||||
switch(curKey->key) {
|
||||
case GFUIK_BACKSPACE:
|
||||
case GFUIK_F1:
|
||||
case GFUIK_F2:
|
||||
case GFUIK_F3:
|
||||
case GFUIK_F4:
|
||||
case GFUIK_F5:
|
||||
case GFUIK_F6:
|
||||
case GFUIK_F7:
|
||||
case GFUIK_F8:
|
||||
case GFUIK_F9:
|
||||
case GFUIK_F10:
|
||||
case GFUIK_F11:
|
||||
case GFUIK_F12:
|
||||
case GFUIK_LEFT:
|
||||
case GFUIK_UP:
|
||||
case GFUIK_RIGHT:
|
||||
case GFUIK_DOWN:
|
||||
case GFUIK_PAGEUP:
|
||||
case GFUIK_PAGEDOWN:
|
||||
case GFUIK_HOME:
|
||||
case GFUIK_END:
|
||||
case GFUIK_INSERT:
|
||||
case GFUIK_DELETE:
|
||||
case GFUIK_CLEAR:
|
||||
case GFUIK_PAUSE:
|
||||
bLeft = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
bLeft = curKey->modifier != GFUIM_NONE;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
bLeft = curKey->modifier != GFUIM_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
// Determine control coordinates, whether left or right column.
|
||||
|
@ -157,7 +157,7 @@ GfuiHelpScreen(void *targetScreen, void *returnScreen)
|
|||
if (curKey == pscrTgt->userKeys)
|
||||
curKey = (tGfuiKey*)NULL;
|
||||
|
||||
} while (curKey);
|
||||
}
|
||||
|
||||
|
||||
// Create Back button.
|
||||
|
|
Loading…
Reference in a new issue