fix exiting command menu

update docs
This commit is contained in:
thrust26 2020-01-20 19:02:55 +01:00
parent dd3a58d4ac
commit 2ee0db23c4
8 changed files with 20 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -2352,10 +2352,15 @@
</tr>
<tr>
<td><pre>-hidpi &lt;1|0&gt;</pre></td>
<td><pre>-hidpi &lt;0|1&gt;</pre></td>
<td>Enables the HiDPI mode which scales the UI by a factor of two.</td>
</tr>
<tr>
<td><pre>-confirmexit &lt;0|1&gt;</pre></td>
<td>Display a popup when emulation is exited.</td>
</tr>
<tr>
<td><pre>-listdelay &lt;delay&gt;</pre></td>
<td>Set the amount of time to wait between treating successive
@ -2853,6 +2858,7 @@
<tr><td>Theme</td><td>Theme to use for UI elements (see examples)</td><td>-uipalette</td></tr>
<tr><td>Dialogs position</td><td>Position of dialogs with Stella window</td><td>-dialogpos</td></tr>
<tr><td>HiDPI mode</td><td>Scales the UI by a factor of two when enabled</td><td>-hidpi</td></tr>
<tr><td>Confirm exiting...</td><td>Display a popup when emulation is exited</td><td>-confirmexit</td></tr>
<tr><td>List input delay</td><td>Maximum delay between keypresses in filelist-widgets before a search string resets. </td><td>-listdelay</td></tr>
<tr><td>Mouse wheel scroll</td><td>Number of lines a mouse scroll will move in list-widgets</td><td>-mwheel</td></tr>
<tr><td>Double-click speed</td><td>Speed of mouse double-clicks</td><td>-mdouble</td></tr>

View File

@ -117,7 +117,7 @@ class Event
ToggleBLCollision, ToggleBLBit, TogglePFCollision, TogglePFBit,
ToggleCollisions, ToggleBits, ToggleFixedColors,
ToggleFrameStats, ToggleSAPortOrder,
ToggleFrameStats, ToggleSAPortOrder, ExitGame,
// add new events from here to avoid that user remapped events get overwritten

View File

@ -770,11 +770,14 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
}
return;
#endif
default:
return;
}
case Event::ExitGame:
exitEmulation(true);
return;
case Event::Quit:
if(pressed && !repeated)
{

View File

@ -74,7 +74,7 @@ CommandDialog::CommandDialog(OSystem& osystem, DialogContainer& parent)
mySaveStateButton = ADD_CD_BUTTON("", kSaveStateCmd);
wid.push_back(mySaveStateButton);
myStateSlotButton = ADD_CD_BUTTON("", kStateSlotCmd);
myStateSlotButton = ADD_CD_BUTTON("Change Slot", kStateSlotCmd);
wid.push_back(myStateSlotButton);
myLoadStateButton = ADD_CD_BUTTON("", kLoadStateCmd);
wid.push_back(myLoadStateButton);
@ -190,7 +190,8 @@ void CommandDialog::handleCommand(CommandSender* sender, int cmd,
break;
case kExitCmd:
instance().eventHandler().handleEvent(Event::ExitMode);
instance().eventHandler().leaveMenuMode();
instance().eventHandler().handleEvent(Event::ExitGame);
break;
// Column 3
@ -212,9 +213,7 @@ void CommandDialog::handleCommand(CommandSender* sender, int cmd,
case kSoundCmd:
{
instance().eventHandler().leaveMenuMode();
bool enabled = instance().audioSettings().enabled();
instance().audioSettings().setEnabled(!enabled);
instance().console().initializeAudio();
instance().sound().toggleMute();
break;
}
case kReloadRomCmd:
@ -253,7 +252,6 @@ void CommandDialog::updateSlot(int slot)
buf << " " << slot;
mySaveStateButton->setLabel("Save State" + buf.str());
myStateSlotButton->setLabel("State Slot" + buf.str());
myLoadStateButton->setLabel("Load State" + buf.str());
}