@@ -1,16 +1,36 @@
diff --git a/src/base/emuview.cpp b/src/base/emuview.cpp
-index dc46602..22c51b1 100644
+index dc46602..8fdaf12 100644
--- a/src/base/emuview.cpp
+++ b/src/base/emuview.cpp
-@@ -238,7 +238,7 @@ bool EmuView::close()
- pause();
- return false;
- } else {
-- qApp->quit();
-+// qApp->quit();
- return true;
- }
+@@ -30,10 +30,8 @@
+ #include <QQuickView>
+ #include <QQmlContext>
+ #include <QtQml>
+-//#include <qdeclarative.h>
+-#include <QCloseEvent>
+ #include <QApplication>
+-//#include <QDesktopWidget>
++#include <QQuickCloseEvent>
+ #include <QQmlEngine>
+ #include <QTimer>
+ #include <QDir>
+@@ -84,6 +82,7 @@ EmuView::EmuView(Emu *emu, const QString &diskFileName, QQuickView *view, QObjec
+ SIGNAL(inputDevicesChanged()));
+ // QObject::connect(m_hostVideo, SIGNAL(shaderChanged()),
+ // SLOT(hostVideoShaderChanged()));
++ connect(m_view, SIGNAL(closing(QQuickCloseEvent)), this, SLOT(closeEvent(QQuickCloseEvent));
+
+ m_stateListModel = new StateListModel(m_emu, m_diskFileName);
+
+@@ -463,7 +462,7 @@ void EmuView::paintEvent(QPaintEvent *)
+ // make sure no paint will occur for this widget
}
+
+-void EmuView::closeEvent(QCloseEvent *e)
++void EmuView::closeEvent(QQuickCloseEvent *e)
+ {
+ e->ignore();
+ close();
diff --git a/src/base/hostaudio.cpp b/src/base/hostaudio.cpp
index 7be42cc..4030cf0 100644
--- a/src/base/hostaudio.cpp
@@ -57,15 +77,18 @@
pa_stream_write(m_stream, data, size, 0, 0, PA_SEEK_RELATIVE);
#if defined(MEEGO_EDITION_HARMATTAN)
diff --git a/src/snes/snes.cpp b/src/snes/snes.cpp
-index 51adb16..a64153f 100644
+index 51adb16..354a4aa 100644
--- a/src/snes/snes.cpp
+++ b/src/snes/snes.cpp
-@@ -304,5 +304,7 @@ int main(int argc, char *argv[]) {
+@@ -301,8 +301,10 @@ int main(int argc, char *argv[]) {
+ // QGuiApplication *app = SailfishApp::application(argc, argv);
+ // QQuickView *view = SailfishApp::createView();
+ QGuiApplication *app = new QGuiApplication(argc, argv);
++ app->setQuitOnLastWindowClosed(false);
QQuickView *view = new QQuickView();
EmuView emuView(&snesEmu, argv[1], view);
- return app->exec();
+ int ret = app-> exec();
-+ emuView.close();
+ return ret;
}
|