Exemplo n.º 1
0
void Emulator::Stop()
{
	if (m_status.exchange(Stopped) == Stopped)
	{
		return;
	}

	LOG_NOTICE(GENERAL, "Stopping emulator...");

	rpcs3::on_stop()();
	SendDbgCommand(DID_STOP_EMU);

	{
		LV2_LOCK;

		idm::select<PPUThread, SPUThread, RawSPUThread, ARMv7Thread>([](u32, cpu_thread& cpu)
		{
			cpu.state += cpu_state::dbg_global_stop;
			cpu->lock();
			cpu->set_exception(std::make_exception_ptr(EmulationStopped()));
			cpu->unlock();
			cpu->notify();
		});
	}

	LOG_NOTICE(GENERAL, "All threads signaled...");

	while (g_thread_count)
	{
		m_cb.process_events();

		std::this_thread::sleep_for(10ms);
	}

	LOG_NOTICE(GENERAL, "All threads stopped...");

	idm::clear();
	fxm::clear();

	LOG_NOTICE(GENERAL, "Objects cleared...");

	GetCallbackManager().Clear();

	RSXIOMem.Clear();
	vm::close();

	SendDbgCommand(DID_STOPPED_EMU);

	if (g_cfg_autoexit)
	{
		GetCallbacks().exit();
	}
	else
	{
		Init();
	}
}
Exemplo n.º 2
0
MenuBar::MenuBar(QWidget* parent)
    : QMenuBar(parent)
{
    AddFileMenu();
    AddEmulationMenu();
    addMenu(tr("Movie"));
    addMenu(tr("Options"));
    addMenu(tr("Tools"));
    AddViewMenu();
    AddHelpMenu();

    EmulationStopped();
}
Exemplo n.º 3
0
ToolBar::ToolBar(QWidget* parent)
	: QToolBar(parent)
{
	setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
	setMovable(false);
	setFloatable(false);
	setIconSize(ICON_SIZE);

	MakeActions();
	UpdateIcons();

	EmulationStopped();
}
Exemplo n.º 4
0
void MainWindow::InitCoreCallbacks()
{
  Core::SetOnStoppedCallback([this] { emit EmulationStopped(); });
  installEventFilter(this);
  m_render_widget->installEventFilter(this);
}
Exemplo n.º 5
0
void MainWindow::ForceStop()
{
	BootManager::Stop();
	HideRenderWidget();
	emit EmulationStopped();
}