mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
Don't allow the F9 and F10 keys to open menus if a menu is already open. (Might
need more testing.) svn-id: r24747
This commit is contained in:
parent
39b27ed3bb
commit
50e2cf9caa
@ -113,13 +113,13 @@ void manageEvents(int count) {
|
||||
}
|
||||
break;
|
||||
case 290: // F9
|
||||
if (allowPlayerInput) {
|
||||
if (allowPlayerInput && !inMenu) {
|
||||
makeActionMenu();
|
||||
makeCommandLine();
|
||||
}
|
||||
break;
|
||||
case 291: // F10
|
||||
if (allowPlayerInput) {
|
||||
if (allowPlayerInput && !inMenu) {
|
||||
g_cine->makeSystemMenu();
|
||||
}
|
||||
break;
|
||||
@ -207,6 +207,7 @@ void mainLoop(int bootScriptIdx) {
|
||||
gfxFuncGen2();
|
||||
|
||||
quitFlag = 0;
|
||||
inMenu = false;
|
||||
allowPlayerInput = 0;
|
||||
checkForPendingDataLoadSwitch = 0;
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
namespace Cine {
|
||||
|
||||
int16 allowSystemMenu = 0;
|
||||
bool inMenu;
|
||||
|
||||
int16 commandVar3[4];
|
||||
int16 commandVar1;
|
||||
@ -911,6 +912,8 @@ void CineEngine::makeSystemMenu(void) {
|
||||
int16 systemCommand;
|
||||
|
||||
if (!allowSystemMenu) {
|
||||
inMenu = true;
|
||||
|
||||
manageEvents();
|
||||
getMouseData(mouseUpdateStatus, (uint16 *)&mouseButton,(uint16 *)&mouseX, (uint16 *)&mouseY);
|
||||
|
||||
@ -1038,6 +1041,8 @@ void CineEngine::makeSystemMenu(void) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
inMenu = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1841,6 +1846,8 @@ void makeActionMenu(void) {
|
||||
uint16 mouseX;
|
||||
uint16 mouseY;
|
||||
|
||||
inMenu = true;
|
||||
|
||||
getMouseData(mouseUpdateStatus, &mouseButton, &mouseX, &mouseY);
|
||||
|
||||
if (g_cine->getGameType() == Cine::GType_OS) {
|
||||
@ -1853,6 +1860,8 @@ void makeActionMenu(void) {
|
||||
} else {
|
||||
playerCommand = makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70);
|
||||
}
|
||||
|
||||
inMenu = false;
|
||||
}
|
||||
|
||||
uint16 executePlayerInput(void) {
|
||||
|
@ -40,6 +40,7 @@ void makeCommandLine(void);
|
||||
void makeActionMenu(void);
|
||||
|
||||
extern int16 allowSystemMenu;
|
||||
extern bool inMenu;
|
||||
|
||||
struct unk1Struct {
|
||||
byte *ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user