mirror of https://github.com/stella-emu/stella.git
pretty hacked and ugly fix for #501
This commit is contained in:
parent
c10b467de1
commit
0215cda991
|
@ -239,7 +239,11 @@ void Console::autodetectFrameLayout(bool reset)
|
||||||
FrameLayoutDetector frameLayoutDetector;
|
FrameLayoutDetector frameLayoutDetector;
|
||||||
myTIA->setFrameManager(&frameLayoutDetector);
|
myTIA->setFrameManager(&frameLayoutDetector);
|
||||||
|
|
||||||
if (reset) mySystem->reset(true);
|
if(reset)
|
||||||
|
{
|
||||||
|
mySystem->reset(true);
|
||||||
|
myOSystem.eventHandler().handleConsoleStartupEvents(myRiot);
|
||||||
|
}
|
||||||
|
|
||||||
for(int i = 0; i < 60; ++i) myTIA->update();
|
for(int i = 0; i < 60; ++i) myTIA->update();
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
#include "RewindManager.hxx"
|
#include "RewindManager.hxx"
|
||||||
#include "TimerManager.hxx"
|
#include "TimerManager.hxx"
|
||||||
#include "Switches.hxx"
|
#include "Switches.hxx"
|
||||||
#include "M6532.hxx"
|
|
||||||
#include "MouseControl.hxx"
|
#include "MouseControl.hxx"
|
||||||
#include "PNGLibrary.hxx"
|
#include "PNGLibrary.hxx"
|
||||||
#include "TIASurface.hxx"
|
#include "TIASurface.hxx"
|
||||||
|
@ -907,7 +906,7 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void EventHandler::handleConsoleStartupEvents()
|
void EventHandler::handleConsoleStartupEvents(const std::unique_ptr<M6532>& riot)
|
||||||
{
|
{
|
||||||
bool update = false;
|
bool update = false;
|
||||||
if(myOSystem.settings().getBool("holdreset"))
|
if(myOSystem.settings().getBool("holdreset"))
|
||||||
|
@ -948,6 +947,10 @@ void EventHandler::handleConsoleStartupEvents()
|
||||||
handleEvent(Event::JoystickOneFire);
|
handleEvent(Event::JoystickOneFire);
|
||||||
|
|
||||||
if(update)
|
if(update)
|
||||||
|
if(riot != nullptr)
|
||||||
|
// TJ: This is ugly!
|
||||||
|
riot->update();
|
||||||
|
else
|
||||||
myOSystem.console().riot().update();
|
myOSystem.console().riot().update();
|
||||||
|
|
||||||
#ifdef DEBUGGER_SUPPORT
|
#ifdef DEBUGGER_SUPPORT
|
||||||
|
|
|
@ -34,6 +34,7 @@ class PhysicalJoystick;
|
||||||
#include "PJoystickHandler.hxx"
|
#include "PJoystickHandler.hxx"
|
||||||
#include "Variant.hxx"
|
#include "Variant.hxx"
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
#include "M6532.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This class takes care of event remapping and dispatching for the
|
This class takes care of event remapping and dispatching for the
|
||||||
|
@ -147,7 +148,7 @@ class EventHandler
|
||||||
Handle events that must be processed each time a new console is
|
Handle events that must be processed each time a new console is
|
||||||
created. Typically, these are events set by commandline arguments.
|
created. Typically, these are events set by commandline arguments.
|
||||||
*/
|
*/
|
||||||
void handleConsoleStartupEvents();
|
void handleConsoleStartupEvents(const std::unique_ptr<M6532>& riot = nullptr);
|
||||||
|
|
||||||
bool frying() const { return myFryingFlag; }
|
bool frying() const { return myFryingFlag; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue