mirror of https://github.com/stella-emu/stella.git
enhanced color switches
enhanced Stella version information
This commit is contained in:
parent
341c6d860c
commit
ece9d507d5
|
@ -1654,7 +1654,7 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
// Events which relate to switches()
|
||||
case Event::ConsoleColor:
|
||||
if(pressed && !repeated)
|
||||
if(pressed && !repeated && !checkUI())
|
||||
{
|
||||
myEvent.set(Event::ConsoleBlackWhite, 0);
|
||||
myEvent.set(Event::ConsoleColor, 1);
|
||||
|
@ -1663,7 +1663,7 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
|||
}
|
||||
return;
|
||||
case Event::ConsoleBlackWhite:
|
||||
if(pressed && !repeated)
|
||||
if(pressed && !repeated && !checkUI())
|
||||
{
|
||||
myEvent.set(Event::ConsoleBlackWhite, 1);
|
||||
myEvent.set(Event::ConsoleColor, 0);
|
||||
|
@ -1672,7 +1672,7 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
|||
}
|
||||
return;
|
||||
case Event::ConsoleColorToggle:
|
||||
if(pressed && !repeated)
|
||||
if(pressed && !repeated && !checkUI())
|
||||
{
|
||||
if(myOSystem.console().switches().tvColor())
|
||||
{
|
||||
|
@ -2822,6 +2822,30 @@ void EventHandler::exitEmulation(bool checkLauncher)
|
|||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool EventHandler::checkUI()
|
||||
{
|
||||
// Special entries to the UI
|
||||
if(myEvent.get(Event::LeftJoystickFire) || myEvent.get(Event::RightJoystickFire))
|
||||
{
|
||||
if(myEvent.get(Event::LeftJoystickRight) || myEvent.get(Event::RightJoystickRight))
|
||||
changeStateByEvent(Event::OptionsMenuMode);
|
||||
else if(myEvent.get(Event::LeftJoystickLeft) || myEvent.get(Event::RightJoystickLeft))
|
||||
changeStateByEvent(Event::TogglePauseMode);
|
||||
else if(myEvent.get(Event::LeftJoystickUp) || myEvent.get(Event::RightJoystickUp))
|
||||
{
|
||||
myOSystem.createLauncher();
|
||||
setState(EventHandlerState::LAUNCHER);
|
||||
}
|
||||
else if(myEvent.get(Event::LeftJoystickDown) || myEvent.get(Event::RightJoystickDown))
|
||||
changeStateByEvent(Event::DebuggerMode);
|
||||
else
|
||||
changeStateByEvent(Event::CmdMenuMode);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
|
||||
#elif defined(__GNUC__) || defined(__GNUG__)
|
||||
|
|
|
@ -481,6 +481,13 @@ class EventHandler
|
|||
static int getEmulActionListIndex(int idx, const Event::EventSet& events);
|
||||
static int getActionListIndex(int idx, Event::Group group);
|
||||
|
||||
/**
|
||||
Check if UI shall be entered.
|
||||
|
||||
@return Whether the UI is entered or not
|
||||
*/
|
||||
bool checkUI();
|
||||
|
||||
private:
|
||||
// Structure used for action menu items
|
||||
struct ActionList {
|
||||
|
|
|
@ -535,8 +535,8 @@ string OSystem::createConsole(const FSNode& rom, string_view md5sum, bool newrom
|
|||
myEventHandler->enterDebugMode();
|
||||
#endif
|
||||
|
||||
if(!showmessage &&
|
||||
settings().getBool(devSettings ? "dev.detectedinfo" : "plr.detectedinfo"))
|
||||
if(!showmessage)
|
||||
if(settings().getBool(devSettings ? "dev.detectedinfo" : "plr.detectedinfo"))
|
||||
{
|
||||
ostringstream msg;
|
||||
|
||||
|
@ -546,6 +546,13 @@ string OSystem::createConsole(const FSNode& rom, string_view md5sum, bool newrom
|
|||
<< " - " << myConsole->getFormatString();
|
||||
myFrameBuffer->showTextMessage(msg.str());
|
||||
}
|
||||
else if(!myLauncherUsed)
|
||||
{
|
||||
ostringstream msg;
|
||||
|
||||
msg << "Stella " << STELLA_VERSION;
|
||||
myFrameBuffer->showTextMessage(msg.str());
|
||||
}
|
||||
// Check for first PlusROM start
|
||||
if(myConsole->cartridge().isPlusROM())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue