diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx index a92347bd2..45d384179 100644 --- a/src/emucore/OSystem.cxx +++ b/src/emucore/OSystem.cxx @@ -686,8 +686,6 @@ double OSystem::dispatchEmulation(EmulationWorker& emulationWorker) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void OSystem::mainLoop() { - // Sleep-based wait: good for CPU, bad for graphical sync - bool busyWait = mySettings->getString("timing") != "sleep"; // 6507 time time_point virtualTime = high_resolution_clock::now(); // The emulation worker @@ -726,10 +724,7 @@ void OSystem::mainLoop() virtualTime = now; else if (virtualTime > now) { // Wait until we have caught up with 6507 time - if (busyWait && myEventHandler->state() == EventHandlerState::EMULATION) { - while (high_resolution_clock::now() < virtualTime); - } - else std::this_thread::sleep_until(virtualTime); + std::this_thread::sleep_until(virtualTime); } } diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx index 04676a9d2..6c9700e17 100644 --- a/src/emucore/Settings.cxx +++ b/src/emucore/Settings.cxx @@ -40,7 +40,6 @@ Settings::Settings(OSystem& osystem) setInternal("fullscreen", "false"); setInternal("center", "false"); setInternal("palette", "standard"); - setInternal("timing", "sleep"); setInternal("uimessages", "true"); // TIA specific options @@ -308,9 +307,6 @@ void Settings::validate() f = getFloat("speed"); if (f <= 0) setInternal("speed", "1.0"); - s = getString("timing"); - if(s != "sleep" && s != "busy") setInternal("timing", "sleep"); - i = getInt("tia.aspectn"); if(i < 80 || i > 120) setInternal("tia.aspectn", "90"); i = getInt("tia.aspectp"); diff --git a/src/gui/VideoDialog.cxx b/src/gui/VideoDialog.cxx index 4217f54bd..dcac75ac2 100644 --- a/src/gui/VideoDialog.cxx +++ b/src/gui/VideoDialog.cxx @@ -215,11 +215,6 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, wid.push_back(myCenter); ypos += (lineHeight + VGAP) * 2; - // Timing to use between frames - myFrameTiming = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Idle between frames (*)"); - wid.push_back(myFrameTiming); - ypos += lineHeight + VGAP; - // Use multi-threading myUseThreads = new CheckboxWidget(myTab, font, xpos, ypos + 1, "Multi-threading"); wid.push_back(myUseThreads); @@ -359,9 +354,6 @@ void VideoDialog::loadConfig() // TIA interpolation myTIAInterpolate->setState(instance().settings().getBool("tia.inter")); - // Wait between frames - myFrameTiming->setState(instance().settings().getString("timing") == "sleep"); - // Aspect ratio setting (NTSC and PAL) myNAspectRatio->setValue(instance().settings().getInt("tia.aspectn")); myPAspectRatio->setValue(instance().settings().getInt("tia.aspectp")); @@ -431,9 +423,6 @@ void VideoDialog::saveConfig() instance().settings().setValue("palette", myTIAPalette->getSelectedTag().toString()); - // Wait between frames - instance().settings().setValue("timing", myFrameTiming->getState() ? "sleep" : "busy"); - // TIA interpolation instance().settings().setValue("tia.inter", myTIAInterpolate->getState()); @@ -514,7 +503,6 @@ void VideoDialog::setDefaults() myRenderer->setSelectedIndex(0); myTIAZoom->setSelected("3", ""); myTIAPalette->setSelected("standard", ""); - myFrameTiming->setState(true); myTIAInterpolate->setState(false); myNAspectRatio->setValue(91); myPAspectRatio->setValue(109); diff --git a/src/gui/VideoDialog.hxx b/src/gui/VideoDialog.hxx index 8e50b3895..4d76383db 100644 --- a/src/gui/VideoDialog.hxx +++ b/src/gui/VideoDialog.hxx @@ -54,7 +54,6 @@ class VideoDialog : public Dialog PopUpWidget* myRenderer; PopUpWidget* myTIAZoom; // TODO: SliderWidget PopUpWidget* myTIAPalette; - CheckboxWidget* myFrameTiming; CheckboxWidget* myTIAInterpolate; SliderWidget* myNAspectRatio; SliderWidget* myPAspectRatio;