Revert "pretty hacked and ugly fix for #501"

This reverts commit 0215cda991.
This commit is contained in:
Christian Speckner 2019-08-20 23:44:19 +02:00
parent 49bf1ebaa9
commit d105a833b6
3 changed files with 5 additions and 13 deletions

View File

@ -239,11 +239,7 @@ void Console::autodetectFrameLayout(bool reset)
FrameLayoutDetector frameLayoutDetector;
myTIA->setFrameManager(&frameLayoutDetector);
if(reset)
{
mySystem->reset(true);
myOSystem.eventHandler().handleConsoleStartupEvents(myRiot);
}
if (reset) mySystem->reset(true);
for(int i = 0; i < 60; ++i) myTIA->update();

View File

@ -35,6 +35,7 @@
#include "RewindManager.hxx"
#include "TimerManager.hxx"
#include "Switches.hxx"
#include "M6532.hxx"
#include "MouseControl.hxx"
#include "PNGLibrary.hxx"
#include "TIASurface.hxx"
@ -906,7 +907,7 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void EventHandler::handleConsoleStartupEvents(const std::unique_ptr<M6532>& riot)
void EventHandler::handleConsoleStartupEvents()
{
bool update = false;
if(myOSystem.settings().getBool("holdreset"))
@ -947,10 +948,6 @@ void EventHandler::handleConsoleStartupEvents(const std::unique_ptr<M6532>& riot
handleEvent(Event::JoystickOneFire);
if(update)
if(riot != nullptr)
// TJ: This is ugly!
riot->update();
else
myOSystem.console().riot().update();
#ifdef DEBUGGER_SUPPORT

View File

@ -34,7 +34,6 @@ class PhysicalJoystick;
#include "PJoystickHandler.hxx"
#include "Variant.hxx"
#include "bspf.hxx"
#include "M6532.hxx"
/**
This class takes care of event remapping and dispatching for the
@ -148,7 +147,7 @@ class EventHandler
Handle events that must be processed each time a new console is
created. Typically, these are events set by commandline arguments.
*/
void handleConsoleStartupEvents(const std::unique_ptr<M6532>& riot = nullptr);
void handleConsoleStartupEvents();
bool frying() const { return myFryingFlag; }