@@ -52,10 +52,40 @@
tools: ToolBarLayout {
ToolIcon {
diff --git a/src/base/emuview.cpp b/src/base/emuview.cpp
-index 736ac4c..6a04138 100644
+index 736ac4c..59e3774 100644
--- a/src/base/emuview.cpp
+++ b/src/base/emuview.cpp
-@@ -101,13 +101,11 @@ EmuView::EmuView(Emu *emu, const QString &diskFileName, QQuickView *view, QObjec
+@@ -61,9 +61,6 @@ EmuView::EmuView(Emu *emu, const QString &diskFileName, QQuickView *view, QObjec
+ {
+ Q_ASSERT(m_emu != 0);
+
+-// setAttribute(Qt::WA_NoSystemBackground);
+-// setAutoFillBackground(false);
+-
+ Configuration::setupAppInfo();
+ registerClassesInQml();
+ pathManager.setCurrentEmu(m_emu->name());
+@@ -71,19 +68,10 @@ EmuView::EmuView(Emu *emu, const QString &diskFileName, QQuickView *view, QObjec
+ m_thread = new EmuThread(m_emu);
+ m_hostInput = new HostInput(m_emu);
+ m_hostAudio = new HostAudio(m_emu);
+-// m_hostVideo = new HostVideo(m_hostInput, m_emu, m_thread, m_view);
+-// QObject::connect(m_hostVideo, SIGNAL(videoFrameChanged(QImage)), this,
+-// SIGNAL(videoFrameChanged(QImage)), Qt::DirectConnection);
+-// m_hostVideo->setParent(m_view);
+-// m_hostVideo->resize(QApplication::desktop()->width(), QApplication::desktop()->height());
+-// m_hostVideo->installEventFilter(m_hostInput);
+-// m_hostInput->touchInputDevice()->setHostVideo(m_hostVideo);
+ QObject::connect(m_hostInput, SIGNAL(quit()), SLOT(close()));
+ QObject::connect(m_hostInput, SIGNAL(pause()), SLOT(pause()));
+ QObject::connect(m_hostInput, SIGNAL(devicesChanged()),
+ SIGNAL(inputDevicesChanged()));
+-// QObject::connect(m_hostVideo, SIGNAL(shaderChanged()),
+-// SLOT(hostVideoShaderChanged()));
+
+ m_stateListModel = new StateListModel(m_emu, m_diskFileName);
+
+@@ -101,28 +89,13 @@ EmuView::EmuView(Emu *emu, const QString &diskFileName, QQuickView *view, QObjec
m_error = tr("Unknown error!");
}
@@ -65,26 +95,27 @@
m_safetyTimer->setInterval(10000);
m_safetyTimer->setSingleShot(false);
QObject::connect(m_safetyTimer, SIGNAL(timeout()), SLOT(onSafetyEvent()));
--
-+/*
- const char *method = "showEmulationView";
- if (m_error.isEmpty()) {
- QObject::connect(m_stateListModel, SIGNAL(slFailed()),
-@@ -121,8 +119,13 @@ EmuView::EmuView(Emu *emu, const QString &diskFileName, QQuickView *view, QObjec
- method = "showSettingsView";
- }
- QMetaObject::invokeMethod(this, method, Qt::QueuedConnection);
-+*/
+
+- const char *method = "showEmulationView";
+- if (m_error.isEmpty()) {
+- QObject::connect(m_stateListModel, SIGNAL(slFailed()),
+- SLOT(onSlFailed()), Qt::QueuedConnection);
+- QObject::connect(m_stateListModel, SIGNAL(stateLoaded()),
+- SLOT(onStateLoaded()), Qt::QueuedConnection);
+-#if defined(Q_WS_MAEMO_5)
+- method = "showSettingsView";
+-#endif
+- } else {
+- method = "showSettingsView";
+- }
+- QMetaObject::invokeMethod(this, method, Qt::QueuedConnection);
+ showEmulationView();
- m_view->rootContext()->setContextProperty("emuView", this);
-+ m_view->rootContext()->setContextProperty("emu", static_cast<QObject *>(m_emu));
-+ m_view->rootContext()->setContextProperty("stateListModel", static_cast<QObject *>(m_stateListModel));
-+ m_view->engine()->addImageProvider("state", new StateImageProvider(m_stateListModel));
+- m_view->rootContext()->setContextProperty("emuView", this);
m_view->setSource(QUrl("/opt/emumaster/qml/base/EmuView.qml"));
m_view->show();
-@@ -139,27 +142,11 @@ EmuView::~EmuView()
+@@ -139,27 +112,11 @@ EmuView::~EmuView()
m_emu->shutdown();
}
delete m_thread;
@@ -112,17 +143,16 @@
// two-stage pause preventing deadlocks
void EmuView::pause()
{
-@@ -204,7 +191,8 @@ void EmuView::pauseStage2()
+@@ -204,7 +161,7 @@ void EmuView::pauseStage2()
}
return;
}
- showSettingsView();
-+// showSettingsView();
+ emit pauseStage2Finished();
}
void EmuView::resume()
-@@ -243,38 +231,9 @@ bool EmuView::close()
+@@ -243,38 +200,9 @@ bool EmuView::close()
}
}
@@ -161,7 +191,34 @@
setSwipeEnabled(m_swipeEnabled);
if (m_audioEnable)
m_hostAudio->open();
-@@ -524,8 +483,6 @@ void EmuView::finishSetupConfiguration()
+@@ -426,13 +354,17 @@ QString EmuView::constructSlErrorString() const
+ void EmuView::fatalError(const QString &errorStr)
+ {
+ m_error = errorStr;
+- showSettingsView();
++ qDebug() << "Fatal Error: " << m_error;
+ }
+
+ void EmuView::registerClassesInQml()
+ {
+ qmlRegisterType<StringListProxy>("EmuMaster", 1, 0, "StringListProxy");
+ qmlRegisterType<FrameItem>("EmuMaster", 1, 0, "FrameItem");
++ m_view->rootContext()->setContextProperty("emuView", this);
++ m_view->rootContext()->setContextProperty("emu", static_cast<QObject *>(m_emu));
++ m_view->rootContext()->setContextProperty("stateListModel", static_cast<QObject *>(m_stateListModel));
++ m_view->engine()->addImageProvider("state", new StateImageProvider(m_stateListModel));
+ }
+
+ QList<QObject *> EmuView::inputDevices() const
+@@ -512,6 +444,7 @@ void EmuView::setSwipeEnabled(bool on)
+ // } else {
+ // XDeleteProperty(dpy, w, atom);
+ // }
++ Q_UNUSED(on)
+ #else
+ Q_UNUSED(on)
+ #endif
+@@ -524,8 +457,6 @@ void EmuView::finishSetupConfiguration()
QSettings s;
m_swipeEnabled = loadOptionFromSettings(s, "swipeEnable").toBool();
m_thread->setFrameSkip(loadOptionFromSettings(s, "frameSkip").toInt());
@@ -170,7 +227,7 @@
setAudioEnabled(loadOptionFromSettings(s, "audioEnable").toBool());
m_runInBackground = loadOptionFromSettings(s, "runInBackground").toBool();
-@@ -644,8 +601,3 @@ void EmuView::disableSafetyTimer()
+@@ -644,8 +575,3 @@ void EmuView::disableSafetyTimer()
m_safetyTimer->stop();
}
|