I have made the following changes intended for :
  CE:Apps / emumaster

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/8105

Thank You,
wonko

[This message was auto-generated]

---

Request # 8105:

Messages from BOSS:

State: review at 2013-02-18T12:06:11 by bossbot

Reviews:
       accepted by bossbot : Prechecks succeeded.
       new for CE-maintainers : Please replace this text with a review and 
approve/reject the review (not the SR). BOSS will take care of the rest

Changes:
  submit: home:wonko:CE:Apps / emumaster -> CE:Apps / emumaster
  
changes files:
--------------

++++++ new changes file:
--- emumaster.changes
+++ emumaster.changes
@@ -0,0 +1,11 @@
+* Fri Feb 08 2013 Ruediger Gad <[email protected]> - 0.3.0
+- Add an improved version.
+  This runs also on PlasmaActive on Archos G9 and Nexus 7.
+- Fix rendering issues in the GUI.
+- Add performance optimizations (especially for Archos G9).
+  These optimizations work on other platforms as well but don't have
+  a similar strong effect as the other platforms had already been very 
performant.
+
+* Sun Oct 28 2012 Ruediger Gad <[email protected]> - 0.3.0
+- First try on getting a release for Nemo done.
+

new:
----
  0001-Remove-six-axis-controller-code.patch
  0002-Remove-obsolete-check-in-diskgallery.patch
  0003-Fix-gpp-maemo-scope-and-libs.patch
  0004-Fix-home-directory-path.patch
  0005-Remove-neon-specific-optimizations.patch
  0006-Dynamically-determine-screensize-for-touchinput.patch
  0007-Dynamically-determine-screensize-for-emuview.patch
  0008-Remove-obsolete-members-from-HostVideo.patch
  0009-Add-prototype-of-new-way-for-drawing-frames.patch
  0010-Add-missing-glpainter.patch
  0011-Fix-settings-view-not-being-displayed.patch
  0012-Fix-diskgallery-rendering-errors.patch
  0013-Remove-psx-from-diskgallery-as-this-is-right-now-not.patch
  emumaster.changes
  emumaster.spec
  emumaster.yaml
  emumaster_0.3.0.tar.gz

spec files:
-----------

++++++ new spec file:
--- emumaster.spec
+++ emumaster.spec
@@ -0,0 +1,123 @@
+# 
+# Do NOT Edit the Auto-generated Part!
+# Generated by: spectacle version 0.25
+# 
+
+Name:       emumaster
+
+# >> macros
+# << macros
+
+Summary:    An emulator for different gaming consoles etc.
+Version:    0.3.0
+Release:    1
+Group:      Amusements/Games
+License:    GPLv2
+ExclusiveArch:  armv7hl armv8el armv7l armv7el
+URL:        https://bitbucket.org/elemental/emumaster/wiki/Home
+Source0:    %{name}_%{version}.tar.gz
+Source100:  emumaster.yaml
+Patch0:     0001-Remove-six-axis-controller-code.patch
+Patch1:     0002-Remove-obsolete-check-in-diskgallery.patch
+Patch2:     0003-Fix-gpp-maemo-scope-and-libs.patch
+Patch3:     0004-Fix-home-directory-path.patch
+Patch4:     0005-Remove-neon-specific-optimizations.patch
+Patch5:     0006-Dynamically-determine-screensize-for-touchinput.patch
+Patch6:     0007-Dynamically-determine-screensize-for-emuview.patch
+Patch7:     0008-Remove-obsolete-members-from-HostVideo.patch
+Patch8:     0009-Add-prototype-of-new-way-for-drawing-frames.patch
+Patch9:     0010-Add-missing-glpainter.patch
+Patch10:     0011-Fix-settings-view-not-being-displayed.patch
+Patch11:     0012-Fix-diskgallery-rendering-errors.patch
+Patch12:     0013-Remove-psx-from-diskgallery-as-this-is-right-now-not.patch
+Requires:   libqtfeedback1
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires:  pkgconfig(QtCore) >= 4.7.0
+BuildRequires:  pkgconfig(QtGui)
+BuildRequires:  pkgconfig(qdeclarative-boostable)
+BuildRequires:  pkgconfig(QtOpenGL)
+BuildRequires:  pkgconfig(QtFeedback)
+BuildRequires:  pkgconfig(QtSensors)
+BuildRequires:  pkgconfig(QtSystemInfo)
+BuildRequires:  pkgconfig(QtNetwork)
+BuildRequires:  pkgconfig(qmsystem2)
+BuildRequires:  pkgconfig(libxml-2.0)
+BuildRequires:  pkgconfig(libpulse)
+BuildRequires:  pkgconfig(gstreamer-0.10)
+BuildRequires:  desktop-file-utils
+
+%description
+EmuMaster emulates popular consoles. It is written in Qt/QML. Item at Nokia 
Store store.ovi.com/content/207988 Donate version store.ovi.com/content/268920
+
+
+%prep
+%setup -q -n %{name}
+
+# 0001-Remove-six-axis-controller-code.patch
+%patch0 -p1
+# 0002-Remove-obsolete-check-in-diskgallery.patch
+%patch1 -p1
+# 0003-Fix-gpp-maemo-scope-and-libs.patch
+%patch2 -p1
+# 0004-Fix-home-directory-path.patch
+%patch3 -p1
+# 0005-Remove-neon-specific-optimizations.patch
+%patch4 -p1
+# 0006-Dynamically-determine-screensize-for-touchinput.patch
+%patch5 -p1
+# 0007-Dynamically-determine-screensize-for-emuview.patch
+%patch6 -p1
+# 0008-Remove-obsolete-members-from-HostVideo.patch
+%patch7 -p1
+# 0009-Add-prototype-of-new-way-for-drawing-frames.patch
+%patch8 -p1
+# 0010-Add-missing-glpainter.patch
+%patch9 -p1
+# 0011-Fix-settings-view-not-being-displayed.patch
+%patch10 -p1
+# 0012-Fix-diskgallery-rendering-errors.patch
+%patch11 -p1
+# 0013-Remove-psx-from-diskgallery-as-this-is-right-now-not.patch
+%patch12 -p1
+# >> setup
+# << setup
+
+%build
+# >> build pre
+cd src
+qmake emumaster.pro
+make
+# << build pre
+
+
+
+# >> build post
+# << build post
+
+%install
+rm -rf %{buildroot}
+# >> install pre
+cd src
+make install INSTALL_ROOT=%{buildroot}
+# << install pre
+
+# >> install post
+# << install post
+
+desktop-file-install --delete-original       \
+  --dir %{buildroot}%{_datadir}/applications             \
+   %{buildroot}%{_datadir}/applications/*.desktop
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%{_datadir}/applications/diskgallery.desktop
+%{_datadir}/policy/etc/syspart.conf.d/*
+/opt/%{name}
+/opt/emumaster/lib/libbase.so.1.0.0
+# >> files
+# << files

other changes:
--------------

++++++ 0001-Remove-six-axis-controller-code.patch (new)
--- 0001-Remove-six-axis-controller-code.patch
+++ 0001-Remove-six-axis-controller-code.patch
@@ -0,0 +1,157 @@
+From 9315cd1c807258e3a47c0d7cd2514128627d9a9b Mon Sep 17 00:00:00 2001
+From: Ruediger Gad <[email protected]>
+Date: Mon, 11 Feb 2013 23:23:02 +0100
+Subject: [PATCH 01/13] Remove six-axis controller code.
+
+
+Signed-off-by: Ruediger Gad <[email protected]>
+---
+ src/base/base.pro      |  4 +---
+ src/base/hostinput.cpp | 43 +------------------------------------------
+ src/base/hostinput.h   |  2 --
+ src/emumaster.pro      |  4 +---
+ 4 files changed, 3 insertions(+), 50 deletions(-)
+
+diff --git a/src/base/base.pro b/src/base/base.pro
+index 6479a72..bc47c5d 100644
+--- a/src/base/base.pro
++++ b/src/base/base.pro
+@@ -2,7 +2,7 @@ TEMPLATE = lib
+ DESTDIR = ../../lib
+ INCLUDEPATH += ..
+ QT += declarative opengl network
+-LIBS += -L../../lib -lpulse -lsixaxisclient
++LIBS += -L../../lib -lpulse
+ CONFIG += mobility
+ MOBILITY += sensors feedback
+ 
+@@ -34,7 +34,6 @@ HEADERS += \
+     hostinputdevice.h \
+     accelinputdevice.h \
+     touchinputdevice.h \
+-    sixaxisinputdevice.h \
+     keybinputdevice.h \
+     crc32.h \
+     emuview.h \
+@@ -56,7 +55,6 @@ SOURCES += \
+     hostinputdevice.cpp \
+     accelinputdevice.cpp \
+     touchinputdevice.cpp \
+-    sixaxisinputdevice.cpp \
+     keybinputdevice.cpp \
+     crc32.cpp \
+     emuview.cpp \
+diff --git a/src/base/hostinput.cpp b/src/base/hostinput.cpp
+index 05636ee..85cf5f3 100644
+--- a/src/base/hostinput.cpp
++++ b/src/base/hostinput.cpp
+@@ -20,9 +20,7 @@
+ #include "touchinputdevice.h"
+ #include "accelinputdevice.h"
+ #include "keybinputdevice.h"
+-#include "sixaxisinputdevice.h"
+ #include "memutils.h"
+-#include <sixaxisclient/sixaxis.h>
+ #include <QKeyEvent>
+ #include <QTouchEvent>
+ 
+@@ -38,8 +36,7 @@
+ 
+ /*! Creates a HostInput object with the given \a emu. */
+ HostInput::HostInput(Emu *emu) :
+-      m_emu(emu),
+-      m_numSixAxes(0)
++      m_emu(emu)
+ {
+       m_padOpacity = emConf.defaultValue("padOpacity").toReal();
+       // first device in the list is always touch device ...
+@@ -47,16 +44,11 @@ HostInput::HostInput(Emu *emu) :
+       // ... and second is always the keyboard
+       m_devices.append(new KeybInputDevice(this));
+       m_devices.append(new AccelInputDevice(this));
+-      // start sixaxis daemon
+-      SixAxisDaemon *daemon = SixAxisDaemon::instance();
+-      QObject::connect(daemon, SIGNAL(newPad()), SLOT(onSixAxisDetected()));
+-      daemon->start();
+ }
+ 
+ /*! Destroys HostInput object. */
+ HostInput::~HostInput()
+ {
+-      SixAxisDaemon::instance()->stop();
+ }
+ 
+ /*! \internal */
+@@ -121,39 +113,6 @@ void HostInput::setupTouchDevice()
+       m_devices.append(touchDevice);
+ }
+ 
+-/*! \internal */
+-void HostInput::onSixAxisDetected()
+-{
+-      SixAxisDaemon *daemon = SixAxisDaemon::instance();
+-      while (daemon->hasNewPad()) {
+-              // create new sixaxis
+-              SixAxis *sixAxis = daemon->nextNewPad();
+-              SixAxisInputDevice *sixAxisDev = new 
SixAxisInputDevice(sixAxis, this);
+-              int index = m_numSixAxes;
+-              sixAxisDev->setDeviceIndex(index);
+-              QObject::connect(sixAxisDev, SIGNAL(destroyed()), 
SLOT(onSixAxisDestroyed()));
+-              QObject::connect(sixAxisDev, SIGNAL(pause()), SIGNAL(pause()));
+-
+-              // set Pad A or Pad B emu function
+-              if (index == 0 || index == 1)
+-                      sixAxisDev->setEmuFunction(index + 1);
+-
+-              m_devices.append(sixAxisDev);
+-              m_numSixAxes++;
+-      }
+-      emit devicesChanged();
+-}
+-
+-/*! \internal */
+-void HostInput::onSixAxisDestroyed()
+-{
+-      SixAxisInputDevice *sixAxisInputDevice = static_cast<SixAxisInputDevice 
*>(sender());
+-      if (m_devices.removeOne(sixAxisInputDevice)) {
+-              m_numSixAxes--;
+-              emit devicesChanged();
+-      }
+-}
+-
+ /*! Returns touch input device. */
+ TouchInputDevice *HostInput::touchInputDevice() const
+ {
+diff --git a/src/base/hostinput.h b/src/base/hostinput.h
+index 8d81547..3d37b4c 100644
+--- a/src/base/hostinput.h
++++ b/src/base/hostinput.h
+@@ -51,8 +51,6 @@ signals:
+ protected:
+       bool eventFilter(QObject *o, QEvent *e);
+ private slots:
+-      void onSixAxisDetected();
+-      void onSixAxisDestroyed();
+ private:
+       void processTouch(QEvent *e);
+       void setupTouchDevice();
+diff --git a/src/emumaster.pro b/src/emumaster.pro
+index 8f02f65..763846a 100644
+--- a/src/emumaster.pro
++++ b/src/emumaster.pro
+@@ -1,11 +1,9 @@
+ TEMPLATE = subdirs
+ 
+ SUBDIRS += \
+-    sixaxisclient \
+     base \
+       nes gba snes psx amiga pico \
+-      diskgallery \
+-    sixaxismonitor
++      diskgallery 
+ 
+ # nes gba snes psx amiga pico \
+ 
+-- 
+1.8.1.2
+

++++++ 0002-Remove-obsolete-check-in-diskgallery.patch (new)
--- 0002-Remove-obsolete-check-in-diskgallery.patch
+++ 0002-Remove-obsolete-check-in-diskgallery.patch
@@ -0,0 +1,34 @@
+From 15b67ed2faa95fa1b4d760d7ba0bc7219fc93083 Mon Sep 17 00:00:00 2001
+From: Ruediger Gad <[email protected]>
+Date: Mon, 11 Feb 2013 23:23:31 +0100
+Subject: [PATCH 02/13] Remove obsolete check in diskgallery.
+
+
+Signed-off-by: Ruediger Gad <[email protected]>
+---
+ src/diskgallery/main.cpp | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/src/diskgallery/main.cpp b/src/diskgallery/main.cpp
+index d4a686f..8cf539f 100644
+--- a/src/diskgallery/main.cpp
++++ b/src/diskgallery/main.cpp
+@@ -28,15 +28,6 @@ int main(int argc, char *argv[])
+       QApplication app(argc, argv);
+ 
+       QSystemInfo sysInfo;
+-      if (sysInfo.version(QSystemInfo::Os) < QString("1.2")) {
+-              QDeclarativeView view;
+-              QObject::connect(view.engine(), SIGNAL(quit()), &view, 
SLOT(close()));
+-              QString qmlPath = QString("%1/qml/gallery/osVersionError.qml")
+-                              .arg(pathManager.installationDirPath());
+-              view.setSource(QUrl::fromLocalFile(qmlPath));
+-              view.showFullScreen();
+-              return app.exec();
+-      }
+ 
+       Configuration::setupAppInfo();
+       pathManager.buildLocalDirTree();
+-- 
+1.8.1.2
+

++++++ 0003-Fix-gpp-maemo-scope-and-libs.patch (new)
--- 0003-Fix-gpp-maemo-scope-and-libs.patch
+++ 0003-Fix-gpp-maemo-scope-and-libs.patch
@@ -0,0 +1,73 @@
+From 67a494dab1b2d6379a96ba9b669c73255a42ebef Mon Sep 17 00:00:00 2001
+From: Ruediger Gad <[email protected]>
+Date: Mon, 11 Feb 2013 23:23:59 +0100
+Subject: [PATCH 03/13] Fix gpp-maemo scope and libs.
+
+
+Signed-off-by: Ruediger Gad <[email protected]>
+---
+ src/base/base.pro               | 4 ++--
+ src/diskgallery/diskgallery.pro | 2 +-
+ src/emu.pri                     | 2 +-
+ src/psx/psx.pro                 | 2 ++
+ 4 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/src/base/base.pro b/src/base/base.pro
+index bc47c5d..77c6ef1 100644
+--- a/src/base/base.pro
++++ b/src/base/base.pro
+@@ -2,11 +2,11 @@ TEMPLATE = lib
+ DESTDIR = ../../lib
+ INCLUDEPATH += ..
+ QT += declarative opengl network
+-LIBS += -L../../lib -lpulse
++LIBS += -L../../lib -lpulse -lQtFeedback
+ CONFIG += mobility
+ MOBILITY += sensors feedback
+ 
+-linux-g++-maemo {
++unix {
+     MEEGO_VERSION_MAJOR     = 1
+     MEEGO_VERSION_MINOR     = 2
+     MEEGO_VERSION_PATCH     = 0
+diff --git a/src/diskgallery/diskgallery.pro b/src/diskgallery/diskgallery.pro
+index e63a0a4..4c2e7f0 100644
+--- a/src/diskgallery/diskgallery.pro
++++ b/src/diskgallery/diskgallery.pro
+@@ -21,7 +21,7 @@ HEADERS += \
+       disklistmodel.h \
+       touchinputview.h
+ 
+-linux-g++-maemo {
++unix {
+       MEEGO_VERSION_MAJOR     = 1
+       MEEGO_VERSION_MINOR     = 2
+       MEEGO_VERSION_PATCH     = 0
+diff --git a/src/emu.pri b/src/emu.pri
+index d5044fd..87227b7 100644
+--- a/src/emu.pri
++++ b/src/emu.pri
+@@ -19,7 +19,7 @@ QT += opengl declarative
+ #             -falign-functions=32
+ #}
+ 
+-linux-g++-maemo {
++unix {
+       MEEGO_VERSION_MAJOR     = 1
+       MEEGO_VERSION_MINOR     = 2
+       MEEGO_VERSION_PATCH     = 0
+diff --git a/src/psx/psx.pro b/src/psx/psx.pro
+index 73e22a8..e923b8f 100644
+--- a/src/psx/psx.pro
++++ b/src/psx/psx.pro
+@@ -1,5 +1,7 @@
+ include(../emu.pri)
+ 
++LIBS += -lz
++
+ HEADERS += \
+     ppf.h \
+     misc.h \
+-- 
+1.8.1.2
+

++++++ 0004-Fix-home-directory-path.patch (new)
--- 0004-Fix-home-directory-path.patch
+++ 0004-Fix-home-directory-path.patch
@@ -0,0 +1,49 @@
+From ece051e538439f33c9f2cd81b3a10628d5a43224 Mon Sep 17 00:00:00 2001
+From: Ruediger Gad <[email protected]>
+Date: Mon, 11 Feb 2013 23:27:45 +0100
+Subject: [PATCH 04/13] Fix home directory path.
+
+
+Signed-off-by: Ruediger Gad <[email protected]>
+---
+ qml/gallery/CoverSelectorPage.qml | 2 +-
+ src/base/pathmanager.cpp          | 3 +--
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/qml/gallery/CoverSelectorPage.qml 
b/qml/gallery/CoverSelectorPage.qml
+index db06dc3..ed4e254 100644
+--- a/qml/gallery/CoverSelectorPage.qml
++++ b/qml/gallery/CoverSelectorPage.qml
+@@ -43,7 +43,7 @@ Page {
+ 
+       FolderListModel {
+               id: folderModel
+-              folder: "file:/home/user/MyDocs/emumaster/covers"
++              folder: "$HOME/emumaster/covers"
+               nameFilters: ["*.jpg"]
+               showDirs: false
+       }
+diff --git a/src/base/pathmanager.cpp b/src/base/pathmanager.cpp
+index 5639cdb..e76489e 100644
+--- a/src/base/pathmanager.cpp
++++ b/src/base/pathmanager.cpp
+@@ -36,7 +36,7 @@ PathManager::PathManager()
+ 
+       m_installationDirPath = "/opt/emumaster";
+       m_userDataDirPath = QString("%1/.emumaster").arg(getenv("HOME"));
+-      m_diskDirBase = QString("%1/MyDocs/emumaster").arg(getenv("HOME"));
++      m_diskDirBase = QString("%1/emumaster").arg(getenv("HOME"));
+ }
+ 
+ /*! Creates subdirs for every emulation in the given \a dir. */
+@@ -60,7 +60,6 @@ void PathManager::buildLocalDirTree()
+       dir.cd("screenshot");   createEmusSubtree(dir); dir.cdUp();
+ 
+       dir = QDir(getenv("HOME"));
+-      dir.cd("MyDocs");
+       dir.mkdir("emumaster");
+       dir.cd("emumaster");
+       dir.mkdir("covers");
+-- 
+1.8.1.2
+

++++++ 0005-Remove-neon-specific-optimizations.patch (new)
--- 0005-Remove-neon-specific-optimizations.patch
+++ 0005-Remove-neon-specific-optimizations.patch
@@ -0,0 +1,55 @@
+From 5d656725665083c86ff3ff53b3bd44de3b918191 Mon Sep 17 00:00:00 2001
+From: Ruediger Gad <[email protected]>
+Date: Mon, 11 Feb 2013 23:28:17 +0100
+Subject: [PATCH 05/13] Remove neon specific optimizations.
+
+
+Signed-off-by: Ruediger Gad <[email protected]>
+---
+ src/base/base.pro | 3 +--
+ src/emumaster.pro | 2 +-
+ src/nes/nes.pro   | 1 -
+ 3 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/src/base/base.pro b/src/base/base.pro
+index 77c6ef1..d84e42e 100644
+--- a/src/base/base.pro
++++ b/src/base/base.pro
+@@ -62,8 +62,7 @@ SOURCES += \
+     emu.cpp \
+     emuinput.cpp \
+     stringlistproxy.cpp \
+-      memutils.cpp \
+-      memset32_neon.S
++      memutils.cpp 
+ 
+ unix {
+       qml.path = /opt/emumaster/qml/base
+diff --git a/src/emumaster.pro b/src/emumaster.pro
+index 763846a..1357d77 100644
+--- a/src/emumaster.pro
++++ b/src/emumaster.pro
+@@ -2,7 +2,7 @@ TEMPLATE = subdirs
+ 
+ SUBDIRS += \
+     base \
+-      nes gba snes psx amiga pico \
++      nes gba snes amiga pico \
+       diskgallery 
+ 
+ # nes gba snes psx amiga pico \
+diff --git a/src/nes/nes.pro b/src/nes/nes.pro
+index e842d70..9e9b82c 100644
+--- a/src/nes/nes.pro
++++ b/src/nes/nes.pro
+@@ -129,7 +129,6 @@ HEADERS += \
+ 
+ SOURCES += \
+       ppu.cpp \
+-      ppu_neon.S \
+       mapper.cpp \
+       disk.cpp \
+       apu.cpp \
+-- 
+1.8.1.2
+

++++++ 0006-Dynamically-determine-screensize-for-touchinput.patch (new)
--- 0006-Dynamically-determine-screensize-for-touchinput.patch
+++ 0006-Dynamically-determine-screensize-for-touchinput.patch
@@ -0,0 +1,259 @@
+From e07942cc3d4a7fc9d265884459c07ea4ffe6a956 Mon Sep 17 00:00:00 2001
+From: Ruediger Gad <[email protected]>
+Date: Mon, 11 Feb 2013 23:29:36 +0100
+Subject: [PATCH 06/13] Dynamically determine screensize for touchinput.
+
+
+Signed-off-by: Ruediger Gad <[email protected]>
+---
+ src/base/touchinputdevice.cpp | 79 +++++++++++++++++++++++--------------------
+ src/base/touchinputdevice.h   |  3 ++
+ 2 files changed, 45 insertions(+), 37 deletions(-)
+
+diff --git a/src/base/touchinputdevice.cpp b/src/base/touchinputdevice.cpp
+index 67052fa..aad2636 100644
+--- a/src/base/touchinputdevice.cpp
++++ b/src/base/touchinputdevice.cpp
+@@ -19,6 +19,8 @@
+ #include "emu.h"
+ #include <QTouchEvent>
+ #include <QPainter>
++#include <QApplication>
++#include <QDesktopWidget>
+ 
+ enum ButtonsInImage {
+       Button_Settings,
+@@ -68,6 +70,9 @@ TouchInputDevice::TouchInputDevice(QObject *parent) :
+       QObject::connect(this, SIGNAL(emuFunctionChanged()), 
SLOT(onEmuFunctionChanged()));
+ 
+       
m_buttonsImage.load(pathManager.installationDirPath()+"/data/buttons.png");
++
++    m_width = QApplication::desktop()->width();
++    m_height = QApplication::desktop()->height();
+ }
+ 
+ void TouchInputDevice::setHostVideo(HostVideo *hostVideo)
+@@ -158,20 +163,20 @@ void TouchInputDevice::convertPad()
+       for (int i = 0; i < m_numPoints; i++) {
+               int x = m_points[i].x();
+               int y = m_points[i].y();
+-              if (y >= HostVideo::Height-m_areaSize) {
+-                      y -= HostVideo::Height-m_areaSize;
++              if (y >= m_height-m_areaSize) {
++                      y -= m_height-m_areaSize;
+                       if (x < m_areaSize) {
+                               // directions
+                               m_buttons |= buttonsInDpad(x, y);
+-                      } else if (x >= HostVideo::Width-m_areaSize) {
++                      } else if (x >= m_width-m_areaSize) {
+                               // a,b,x,y
+-                              x -= HostVideo::Width-m_areaSize;
++                              x -= m_width-m_areaSize;
+                               m_buttons |= buttonsInDpad(x, y) << 4;
+-                      } else if (x >= HostVideo::Width/2-ButtonWidth &&
+-                                         x < HostVideo::Width/2+ButtonWidth) {
++                      } else if (x >= m_width/2-ButtonWidth &&
++                                         x < m_width/2+ButtonWidth) {
+                               // select, start
+                               if (y >= m_areaSize-ButtonHeight) {
+-                                      if (x < HostVideo::Width/2)
++                                      if (x < m_width/2)
+                                               m_buttons |= 
EmuPad::Button_Select;
+                                       else
+                                               m_buttons |= 
EmuPad::Button_Start;
+@@ -183,9 +188,9 @@ void TouchInputDevice::convertPad()
+                               m_buttons |= EmuPad::Button_L1;
+                       else if (x < ButtonWidth*2)
+                               m_buttons |= EmuPad::Button_L2;
+-                      else if (x >= HostVideo::Width-ButtonWidth)
++                      else if (x >= m_width-ButtonWidth)
+                               m_buttons |= EmuPad::Button_R1;
+-                      else if (x >= HostVideo::Width-ButtonWidth*2)
++                      else if (x >= m_width-ButtonWidth*2)
+                               m_buttons |= EmuPad::Button_R2;
+               }
+       }
+@@ -206,8 +211,8 @@ void TouchInputDevice::convertMouse()
+       for (int i = 0; i < m_numPoints; i++) {
+               int x = m_points[i].x();
+               int y = m_points[i].y();
+-              if (y >= HostVideo::Height-m_areaSize) {
+-                      y -= HostVideo::Height-m_areaSize;
++              if (y >= m_height-m_areaSize) {
++                      y -= m_height-m_areaSize;
+                       if (x < m_areaSize) {
+                               m_mouseX = x - m_areaSize/2;
+                               m_mouseY = y - m_areaSize/2;
+@@ -217,8 +222,8 @@ void TouchInputDevice::convertMouse()
+                                       m_lastMouseY = m_mouseY;
+                               }
+                               newMoving = true;
+-                      } else if (x >= HostVideo::Width-m_areaSize) {
+-                              x -= HostVideo::Width-m_areaSize;
++                      } else if (x >= m_width-m_areaSize) {
++                              x -= m_width-m_areaSize;
+                               int buttons = buttonsInDpad(x, y);
+                               // swap bits
+                               int left   = (buttons & 2) >> 1;
+@@ -391,7 +396,7 @@ void TouchInputDevice::updatePaintedButtons()
+ 
+       // settings,exit
+       addPaintedButton(Button_Settings, 0, QPointF(0, 0));
+-      addPaintedButton(Button_Exit, 0, 
QPointF(HostVideo::Width-PaintedButtonSize, 0));
++      addPaintedButton(Button_Exit, 0, QPointF(m_width-PaintedButtonSize, 0));
+ 
+       if (emuFunction() <= 2)
+               addPaintedButtonsPad();
+@@ -402,17 +407,17 @@ void TouchInputDevice::updatePaintedButtons()
+ void TouchInputDevice::addPaintedButtonsPad()
+ {
+       // left dpad
+-      QPointF leftPos(10, HostVideo::Height-m_areaSize/2-PaintedButtonSize/2);
++      QPointF leftPos(10, m_height-m_areaSize/2-PaintedButtonSize/2);
+       addPaintedButton(Button_Left, EmuPad::Button_Left, leftPos);
+       QPointF rightPos(m_areaSize-PaintedButtonSize-10, leftPos.y());
+       addPaintedButton(Button_Right, EmuPad::Button_Right, rightPos);
+       QPointF upPos(m_areaSize/2-PaintedButtonSize/2,
+-                                HostVideo::Height-m_areaSize+10);
++                                m_height-m_areaSize+10);
+       addPaintedButton(Button_Up, EmuPad::Button_Up, upPos);
+-      QPointF downPos(upPos.x(), HostVideo::Height-PaintedButtonSize-10);
++      QPointF downPos(upPos.x(), m_height-PaintedButtonSize-10);
+       addPaintedButton(Button_Down, EmuPad::Button_Down, downPos);
+       // buttons at the right
+-      QPointF offset(HostVideo::Width-m_areaSize, 0);
++      QPointF offset(m_width-m_areaSize, 0);
+       if (!m_gbaButtonsEnable) {
+               if (!m_picoButtonsEnable) {
+                       addPaintedButton(m_psxButtonsEnable ? Button_Square : 
Button_Y,
+@@ -430,7 +435,7 @@ void TouchInputDevice::addPaintedButtonsPad()
+                                        EmuPad::Button_B, downPos + offset);
+       // l1,r1,l2,r2
+       QPointF lPos(ButtonWidth/2-PaintedButtonSize/2, m_lrYPos);
+-      QPointF rPos = lPos + QPointF(HostVideo::Width-ButtonWidth, 0);
++      QPointF rPos = lPos + QPointF(m_width-ButtonWidth, 0);
+       QPointF l2Pos = lPos + QPointF(ButtonWidth, 0);
+       QPointF r2Pos = rPos - QPointF(ButtonWidth, 0);
+       if (m_lrVisible) {
+@@ -450,8 +455,8 @@ void TouchInputDevice::addPaintedButtonsPad()
+               }
+       }
+       // select,start
+-      QPointF selectPos(HostVideo::Width/2-ButtonWidth/2-PaintedButtonSize/2,
+-                                        
HostVideo::Height-ButtonHeight/2-PaintedButtonSize/2);
++      QPointF selectPos(m_width/2-ButtonWidth/2-PaintedButtonSize/2,
++                                        
m_height-ButtonHeight/2-PaintedButtonSize/2);
+       QPointF startPos = selectPos + QPointF(ButtonWidth, 0);
+       addPaintedButton(Button_Select, EmuPad::Button_Select, selectPos);
+       addPaintedButton(Button_Start, EmuPad::Button_Start, startPos);
+@@ -459,13 +464,13 @@ void TouchInputDevice::addPaintedButtonsPad()
+ 
+ void TouchInputDevice::addPaintedButtonsMouse()
+ {
+-      QPointF leftPos(10, HostVideo::Height-m_areaSize/2-PaintedButtonSize/2);
++      QPointF leftPos(10, m_height-m_areaSize/2-PaintedButtonSize/2);
+       QPointF rightPos(m_areaSize-PaintedButtonSize-10, leftPos.y());
+       QPointF upPos(m_areaSize/2-PaintedButtonSize/2,
+-                                HostVideo::Height-m_areaSize+10);
+-      QPointF downPos(upPos.x(), HostVideo::Height-PaintedButtonSize-10);
++                                m_height-m_areaSize+10);
++      QPointF downPos(upPos.x(), m_height-PaintedButtonSize-10);
+       // buttons at the right
+-      QPointF offset(HostVideo::Width-m_areaSize, 0);
++      QPointF offset(m_width-m_areaSize, 0);
+ 
+       addPaintedButton(Button_L, EmuMouse::Button_Left, downPos + offset);
+       addPaintedButton(Button_R, EmuMouse::Button_Right, rightPos + offset);
+@@ -492,7 +497,7 @@ void TouchInputDevice::addPaintedButton(int button, int 
flag, QPointF pos)
+ 
+ void TouchInputDevice::updateGrid()
+ {
+-      m_lrYPos = ButtonHeight/2+(HostVideo::Height-m_areaSize-ButtonHeight)/2;
++      m_lrYPos = ButtonHeight/2+(m_height-m_areaSize-ButtonHeight)/2;
+       m_grid = QPainterPath();
+ 
+       if (emuFunction() <= 0)
+@@ -501,7 +506,7 @@ void TouchInputDevice::updateGrid()
+       // add "touchpad" rect even if grid is not visible
+       if (emuFunction() >= 3 && emuFunction() <= 4 && (m_gridVisible || 
m_buttonsVisible)) {
+               // left "touchpad"
+-              QPointF p1(0, HostVideo::Height-m_areaSize);
++              QPointF p1(0, m_height-m_areaSize);
+               QSizeF sizeArea(m_areaSize-1, m_areaSize-1);
+               m_grid.addRect(QRectF(p1, sizeArea));
+       }
+@@ -513,14 +518,14 @@ void TouchInputDevice::updateGrid()
+       // settings button
+       m_grid.addRect(QRectF(QPointF(0, 0), sizeButton));
+       // exit button
+-      m_grid.addRect(QRectF(QPointF(HostVideo::Width-ButtonWidth, 0), 
sizeButton));
++      m_grid.addRect(QRectF(QPointF(m_width-ButtonWidth, 0), sizeButton));
+ 
+       if (emuFunction() <= 2) {
+               addGridPad();
+       } else if (emuFunction() <= 4) {
+               // l,r,m mouse buttons
+-              addDpadAreaToGrid(HostVideo::Width-m_areaSize,
+-                                                HostVideo::Height-m_areaSize);
++              addDpadAreaToGrid(m_width-m_areaSize,
++                                                m_height-m_areaSize);
(60 more lines skipped)

++++++ 0007-Dynamically-determine-screensize-for-emuview.patch (new)
--- 0007-Dynamically-determine-screensize-for-emuview.patch
+++ 0007-Dynamically-determine-screensize-for-emuview.patch
@@ -0,0 +1,35 @@
+From 715aae92fca9d803490193047f1fca0aafca0e88 Mon Sep 17 00:00:00 2001
+From: Ruediger Gad <[email protected]>
+Date: Mon, 11 Feb 2013 23:29:48 +0100
+Subject: [PATCH 07/13] Dynamically determine screensize for emuview.
+
+
+Signed-off-by: Ruediger Gad <[email protected]>
+---
+ src/base/emuview.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/base/emuview.cpp b/src/base/emuview.cpp
+index 2f2472c..94e53b8 100644
+--- a/src/base/emuview.cpp
++++ b/src/base/emuview.cpp
+@@ -31,6 +31,7 @@
+ #include <qdeclarative.h>
+ #include <QCloseEvent>
+ #include <QApplication>
++#include <QDesktopWidget>
+ #include <QDeclarativeEngine>
+ #include <QTimer>
+ #include <QDir>
+@@ -67,7 +68,7 @@ EmuView::EmuView(Emu *emu, const QString &diskFileName) :
+       m_hostAudio = new HostAudio(m_emu);
+       m_hostVideo = new HostVideo(m_hostInput, m_emu, m_thread);
+       m_hostVideo->setParent(this);
+-      m_hostVideo->resize(HostVideo::Width, HostVideo::Height);
++      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()));
+-- 
+1.8.1.2
+

++++++ 0008-Remove-obsolete-members-from-HostVideo.patch (new)
--- 0008-Remove-obsolete-members-from-HostVideo.patch
+++ 0008-Remove-obsolete-members-from-HostVideo.patch
@@ -0,0 +1,416 @@
+From f8369d8e17326b8eede012f77fba7d9a6fc25daa Mon Sep 17 00:00:00 2001
+From: Ruediger Gad <[email protected]>
+Date: Mon, 11 Feb 2013 23:30:13 +0100
+Subject: [PATCH 08/13] Remove obsolete members from HostVideo.
+
+
+Signed-off-by: Ruediger Gad <[email protected]>
+---
+ src/base/emuview.cpp   |  12 +--
+ src/base/hostinput.cpp |   2 +-
+ src/base/hostvideo.cpp | 220 +------------------------------------------------
+ src/base/hostvideo.h   |  33 --------
+ 4 files changed, 11 insertions(+), 256 deletions(-)
+
+diff --git a/src/base/emuview.cpp b/src/base/emuview.cpp
+index 94e53b8..0a8b40a 100644
+--- a/src/base/emuview.cpp
++++ b/src/base/emuview.cpp
+@@ -138,7 +138,8 @@ void EmuView::setupSettingsView()
+ {
+       m_settingsView = new QDeclarativeView(this);
+       m_settingsView->setViewport(new QGLWidget());
+-      m_settingsView->resize(HostVideo::Width, HostVideo::Height);
++    //FIXME: Resize properly.
++//    m_settingsView->resize(HostVideo::Width, HostVideo::Height);
+       QObject::connect(m_settingsView->engine(), SIGNAL(quit()), 
SLOT(close()));
+ 
+       m_settingsView->engine()->addImageProvider("state", new 
StateImageProvider(m_stateListModel));
+@@ -509,7 +510,6 @@ void EmuView::finishSetupConfiguration()
+       m_thread->setFrameSkip(loadOptionFromSettings(s, "frameSkip").toInt());
+       m_hostVideo->setFpsVisible(loadOptionFromSettings(s, 
"fpsVisible").toBool());
+       m_hostVideo->setKeepAspectRatio(loadOptionFromSettings(s, 
"keepAspectRatio").toBool());
+-      m_hostVideo->setShader(loadOptionFromSettings(s, 
"videoFilter").toString());
+       setAudioEnabled(loadOptionFromSettings(s, "audioEnable").toBool());
+       m_runInBackground = loadOptionFromSettings(s, 
"runInBackground").toBool();
+ 
+@@ -622,17 +622,17 @@ bool EmuView::areLRButtonsVisible() const
+ 
+ void EmuView::setVideoFilter(const QString &name)
+ {
+-      m_hostVideo->setShader(name);
++    //FIXME: Remove
+ }
+ 
+ QString EmuView::videoFilter() const
+ {
+-      return m_hostVideo->shader();
++    //FIXME: Remove
+ }
+ 
+ QStringList EmuView::availableVideoFilters() const
+ {
+-      return m_hostVideo->shaderList();
++    //FIXME: Remove
+ }
+ 
+ void EmuView::disableSafetyTimer()
+@@ -643,6 +643,6 @@ void EmuView::disableSafetyTimer()
+ 
+ void EmuView::hostVideoShaderChanged()
+ {
+-      emConf.setValue("videoFilter", m_hostVideo->shader());
++    //FIXME: Remove
+       emit videoFilterChanged();
+ }
+diff --git a/src/base/hostinput.cpp b/src/base/hostinput.cpp
+index 85cf5f3..9363ad2 100644
+--- a/src/base/hostinput.cpp
++++ b/src/base/hostinput.cpp
+@@ -89,7 +89,7 @@ void HostInput::processTouch(QEvent *e)
+               if (y < 64) {
+                       if (x < 80)
+                               emit pause();
+-                      else if (x > HostVideo::Width-80)
++                      else if (x > 800) //FIXME: 800 is a hardcoded value.
+                               emit quit();
+               }
+       }
+diff --git a/src/base/hostvideo.cpp b/src/base/hostvideo.cpp
+index f9f3e6e..16b7634 100644
+--- a/src/base/hostvideo.cpp
++++ b/src/base/hostvideo.cpp
+@@ -40,26 +40,6 @@ struct QGLRect
+       operator QRectF() const {return QRectF(left, top, right-left, 
bottom-top);}
+ };
+ 
+-static const char *defaultVertexShader =
+-              "attribute highp vec4 a_vertex;           \n"
+-              "attribute vec2 a_texCoord;               \n"
+-              "varying vec2 v_texCoord;                 \n"
+-              "uniform highp mat4 u_pvmMatrix;          \n"
+-              "void main()                              \n"
+-              "{                                        \n"
+-              "    gl_Position = u_pvmMatrix * a_vertex;\n"
+-              "    v_texCoord = a_texCoord;             \n"
+-              "}                                        \n";
+-
+-static const char *defaultFragmentShader =
+-              "precision mediump float;                            \n"
+-              "varying vec2 v_texCoord;                            \n"
+-              "uniform sampler2D s_texture;                        \n"
+-              "void main()                                         \n"
+-              "{                                                   \n"
+-              "    gl_FragColor = texture2D(s_texture, v_texCoord);\n"
+-              "}                                                   \n";
+-
+ /*!
+       \class HostVideo
+       HostVideo class displays frames generated by the emulation and buttons
+@@ -78,10 +58,7 @@ HostVideo::HostVideo(HostInput *hostInput,
+       QGLWidget(parent),
+       m_hostInput(hostInput),
+       m_emu(emu),
+-      m_thread(thread),
+-      m_program(0),
+-      m_programIndex(0),
+-      m_programDirty(true)
++      m_thread(thread)
+ {
+       setAttribute(Qt::WA_NoSystemBackground);
+       setAttribute(Qt::WA_AcceptTouchEvents);
+@@ -95,8 +72,6 @@ HostVideo::HostVideo(HostInput *hostInput,
+ 
+       m_keepAspectRatio = emConf.defaultValue("keepAspectRatio").toBool();
+ 
+-      setupProgramList();
+-
+       QObject::connect(m_emu, SIGNAL(videoSrcRectChanged()), 
SLOT(updateRects()));
+ }
+ 
+@@ -119,88 +94,7 @@ static inline void setCoords(GLfloat *coords, const 
QGLRect &rect)
+ /*! \internal */
+ void HostVideo::paintEvent(QPaintEvent *)
+ {
+-      if (!m_thread->m_inFrameGenerated)
+-              return;
+-
+-      if (m_programDirty) {
+-              if (!loadShaderProgram())
+-                      return;
+-      }
+-
+-      QPainter painter;
+-      painter.begin(this);
+-
+-      // clear screen early only when we are not drawing on entire screen 
later
+-      if (m_keepAspectRatio)
+-              painter.fillRect(rect(), Qt::black);
+-
+-      painter.beginNativePainting();
+-      paintEmuFrame();
+-      painter.endNativePainting();
+-
+-      if (m_fpsVisible)
+-              paintFps(&painter);
+-
+-      // draw buttons
+-      m_hostInput->paint(&painter);
+-      painter.end();
+-}
+-
+-void HostVideo::paintGL()
+-{
+-      paintEmuFrame();
+-}
+-
+-void HostVideo::paintEmuFrame()
+-{
+-      const QImage &tex = m_emu->frame();
+-      QSizeF textureSize = tex.size();
+-      QGLRect src = m_srcRect;
+-      GLfloat dx = 1.0 / textureSize.width() ;
+-      GLfloat dy = 1.0 / textureSize.height();
+-      QGLRect srcTextureRect(src.left*dx, src.top*dy, src.right*dx, 
src.bottom*dy);
+-      setCoords(m_texCoordArray, srcTextureRect);
+-
+-      if (m_keepAspectRatio) {
+-              qglClearColor(Qt::black);
+-              glClear(GL_COLOR_BUFFER_BIT);
+-      }
+-      m_program->bind();
+-      if (m_u_displaySizeLocation != -1) {
+-              qreal w = m_dstRect.width() * textureSize.width() / 
m_srcRect.width();
+-              qreal h = m_dstRect.height() * textureSize.height() / 
m_srcRect.height();
+-              m_program->setUniformValue(m_u_displaySizeLocation, QSizeF(w, 
h));
+-      }
+-      m_program->enableAttributeArray(m_a_vertexLocation);
+-      m_program->enableAttributeArray(m_a_texCoordLocation);
+-      m_program->setAttributeArray(m_a_vertexLocation, m_vertexArray, 2);
+-      m_program->setAttributeArray(m_a_texCoordLocation, m_texCoordArray, 2);
+-      glActiveTexture(GL_TEXTURE0);
+-      bindTexture(tex, GL_TEXTURE_2D, GL_RGB, 
QGLContext::MemoryManagedBindOption);
+-      glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+-      m_program->disableAttributeArray(m_a_vertexLocation);
+-      m_program->disableAttributeArray(m_a_texCoordLocation);
+-      m_program->release();
+-}
+-
+-/*! \internal */
(217 more lines skipped)

++++++ 0009-Add-prototype-of-new-way-for-drawing-frames.patch (new)
--- 0009-Add-prototype-of-new-way-for-drawing-frames.patch
+++ 0009-Add-prototype-of-new-way-for-drawing-frames.patch
@@ -0,0 +1,182 @@
+From c7710a12877465a548a2894ff81e62d90f86cc8f Mon Sep 17 00:00:00 2001
+From: Ruediger Gad <[email protected]>
+Date: Mon, 11 Feb 2013 23:30:41 +0100
+Subject: [PATCH 09/13] Add prototype of new way for drawing frames.
+
+
+Signed-off-by: Ruediger Gad <[email protected]>
+---
+ src/base/base.pro      |  4 +++-
+ src/base/emuview.cpp   |  2 +-
+ src/base/hostvideo.cpp | 29 ++++++++++++++++++++++++++++-
+ src/base/hostvideo.h   | 29 +++++++++++++++++++++--------
+ src/snes/snes.cpp      |  1 +
+ 5 files changed, 54 insertions(+), 11 deletions(-)
+
+diff --git a/src/base/base.pro b/src/base/base.pro
+index d84e42e..5aae514 100644
+--- a/src/base/base.pro
++++ b/src/base/base.pro
+@@ -42,6 +42,7 @@ HEADERS += \
+     emuinput.h \
+     stringlistproxy.h \
+     audioringbuffer.h \
++    glpainter.h \
+     memutils.h
+ 
+ SOURCES += \
+@@ -62,7 +63,8 @@ SOURCES += \
+     emu.cpp \
+     emuinput.cpp \
+     stringlistproxy.cpp \
+-      memutils.cpp 
++    glpainter.cpp \
++    memutils.cpp 
+ 
+ unix {
+       qml.path = /opt/emumaster/qml/base
+diff --git a/src/base/emuview.cpp b/src/base/emuview.cpp
+index 0a8b40a..8a9a787 100644
+--- a/src/base/emuview.cpp
++++ b/src/base/emuview.cpp
+@@ -322,7 +322,7 @@ void EmuView::onFrameGenerated(bool videoOn)
+       if (m_audioEnable)
+               m_hostAudio->sendFrame();
+       if (videoOn)
+-              m_hostVideo->repaint();
++              
m_hostVideo->updateFrame(m_emu->frame().copy(m_emu->videoSrcRect().toRect()));
+       // sync input with the emulation
+       m_hostInput->sync();
+ }
+diff --git a/src/base/hostvideo.cpp b/src/base/hostvideo.cpp
+index 16b7634..922e27c 100644
+--- a/src/base/hostvideo.cpp
++++ b/src/base/hostvideo.cpp
+@@ -58,10 +58,13 @@ HostVideo::HostVideo(HostInput *hostInput,
+       QGLWidget(parent),
+       m_hostInput(hostInput),
+       m_emu(emu),
+-      m_thread(thread)
++      m_thread(thread),
++    glPainter(this),
++    glThread(this)
+ {
+       setAttribute(Qt::WA_NoSystemBackground);
+       setAttribute(Qt::WA_AcceptTouchEvents);
++    setAttribute(Qt::WA_PaintOutsidePaintEvent);
+       setAttribute(Qt::WA_QuitOnClose, false);
+       setAutoFillBackground(false);
+ 
+@@ -73,6 +76,8 @@ HostVideo::HostVideo(HostInput *hostInput,
+       m_keepAspectRatio = emConf.defaultValue("keepAspectRatio").toBool();
+ 
+       QObject::connect(m_emu, SIGNAL(videoSrcRectChanged()), 
SLOT(updateRects()));
++    QObject::connect(this, SIGNAL(videoFrameChanged(QImage)), &glPainter,
++                     SLOT(paintFrame(QImage)), Qt::QueuedConnection);
+ }
+ 
+ HostVideo::~HostVideo()
+@@ -97,12 +102,34 @@ void HostVideo::paintEvent(QPaintEvent *)
+     // We do nothing here as we render in a distinct thread.
+ }
+ 
++void HostVideo::resizeEvent(QResizeEvent *event)
++{
++    glPainter.resizeViewport(event->size());
++}
++
+ /*! Sets if fps should be drawn (\a on=true) or not. */
+ void HostVideo::setFpsVisible(bool on)
+ {
+       m_fpsVisible = on;
+ }
+ 
++void HostVideo::startRendering()
++{
++    glPainter.moveToThread(&glThread);
++    connect(&glThread, SIGNAL(started()), &glPainter, SLOT(start()));
++    glThread.start();
++}
++
++void HostVideo::stopRendering()
++{
++    glPainter.stop();
++    glThread.wait();
++}
++
++void HostVideo::updateFrame(QImage frame) {
++    emit videoFrameChanged(frame);
++}
++
+ /*! \internal */
+ void HostVideo::updateRects()
+ {
+diff --git a/src/base/hostvideo.h b/src/base/hostvideo.h
+index 073bc4d..9641743 100644
+--- a/src/base/hostvideo.h
++++ b/src/base/hostvideo.h
+@@ -22,7 +22,8 @@ class HostInput;
+ #include "base_global.h"
+ #include <QGLWidget>
+ #include <QTime>
+-#include <QGLShaderProgram>
++#include <QThread>
++#include "glpainter.h"
+ 
+ class BASE_EXPORT HostVideo : public QGLWidget
+ {
+@@ -43,13 +44,10 @@ public:
+       QRectF dstRect() const;
+ 
+       QPoint convertCoordHostToEmu(const QPoint &hostPos);
+-signals:
+-      void shaderChanged();
+-protected:
+-      void paintEvent(QPaintEvent *);
+-private slots:
+-      void updateRects();
+-private:
++
++    void startRendering();
++    void stopRendering();
++
+       HostInput *m_hostInput;
+       Emu *m_emu;
+       EmuThread *m_thread;
+@@ -63,6 +61,21 @@ private:
+       QTime m_fpsCounterTime;
+ 
+       bool m_keepAspectRatio;
++
++    void updateFrame(QImage frame);
++signals:
++    void videoFrameChanged(QImage frame);
++
++protected:
++      void paintEvent(QPaintEvent *);
++    void resizeEvent(QResizeEvent *event);
++
++private slots:
++      void updateRects();
++
++private:
++    GLPainter glPainter;
++    QThread glThread;
+ };
+ 
+ inline QRectF HostVideo::dstRect() const
+diff --git a/src/snes/snes.cpp b/src/snes/snes.cpp
+index 18d0bae..4732222 100644
+--- a/src/snes/snes.cpp
++++ b/src/snes/snes.cpp
+@@ -294,6 +294,7 @@ void SnesEmu::sl() {
+ int main(int argc, char *argv[]) {
+       if (argc < 2)
+               return -1;
++      QCoreApplication::setAttribute(Qt::AA_X11InitThreads);
+       QApplication app(argc, argv);
+       EmuView view(&snesEmu, argv[1]);
+       return app.exec();
+-- 
+1.8.1.2
+

++++++ 0010-Add-missing-glpainter.patch (new)
--- 0010-Add-missing-glpainter.patch
+++ 0010-Add-missing-glpainter.patch
@@ -0,0 +1,159 @@
+From bd8bd162e53f793493ea0decd4a4af2233a86767 Mon Sep 17 00:00:00 2001
+From: Ruediger Gad <[email protected]>
+Date: Mon, 11 Feb 2013 23:31:16 +0100
+Subject: [PATCH 10/13] Add missing glpainter.
+
+
+Signed-off-by: Ruediger Gad <[email protected]>
+---
+ src/base/glpainter.cpp | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/base/glpainter.h   | 55 ++++++++++++++++++++++++++++++++++++
+ 2 files changed, 130 insertions(+)
+ create mode 100644 src/base/glpainter.cpp
+ create mode 100644 src/base/glpainter.h
+
+diff --git a/src/base/glpainter.cpp b/src/base/glpainter.cpp
+new file mode 100644
+index 0000000..9d48b72
+--- /dev/null
++++ b/src/base/glpainter.cpp
+@@ -0,0 +1,75 @@
++#include <QDebug>
++#include "glpainter.h"
++#include "hostvideo.h"
++#include "emu.h"
++#include "emuthread.h"
++#include "hostinput.h"
++
++GLPainter::GLPainter(HostVideo *widget) :
++    glWidget(widget),
++    doRendering(true)
++    {
++    }
++
++void GLPainter::start()
++{
++    qDebug("Starting glPainter");
++//    glWidget->makeCurrent();
++//    startTimer(20);
++}
++
++void GLPainter::stop()
++{
++    QMutexLocker locker(&mutex);
++    doRendering = false;
++}
++
++void GLPainter::resizeViewport(const QSize &size)
++{
++    QMutexLocker locker(&mutex);
++    viewportWidth = size.width();
++    viewportHeight = size.height();
++}
++
++void GLPainter::paintFps(QPainter *painter)
++{
++      // calculate fps
++      glWidget->m_fpsCounter++;
++      if (glWidget->m_fpsCounterTime.elapsed() >= 1000) {
++              glWidget->m_fpsCount = glWidget->m_fpsCounter;
++              glWidget->m_fpsCounter = 0;
++              glWidget->m_fpsCounterTime.restart();
++      }
++      // set font and draw fps
++      QFont font = painter->font();
++      font.setPointSize(12);
++      painter->setFont(font);
++      painter->setPen(Qt::red);
++      painter->drawText(QRectF(80.0f, 0.0f, 100.0f, 60.0f),
++                                        Qt::AlignCenter,
++                                        QString("%1 
FPS").arg(glWidget->m_fpsCount));
++}
++
++void GLPainter::paintFrame(QImage frame) {
++    QMutexLocker locker(&mutex);
++
++    glWidget->makeCurrent();
++    QPainter painter(glWidget);
++//    painter.begin(this);
++
++      // clear screen early only when we are not drawing on entire screen 
later
++      if (glWidget->m_keepAspectRatio)
++              painter.fillRect(glWidget->rect(), Qt::black);
++
++    GLuint t = glWidget->bindTexture(frame);
++    glWidget->drawTexture(glWidget->m_dstRect, t);
++    glWidget->deleteTexture(t);
++
++      if (glWidget->m_fpsVisible)
++              paintFps(&painter);
++
++      // draw buttons
++      glWidget->m_hostInput->paint(&painter);
++      painter.end();
++}
++
+diff --git a/src/base/glpainter.h b/src/base/glpainter.h
+new file mode 100644
+index 0000000..720a100
+--- /dev/null
++++ b/src/base/glpainter.h
+@@ -0,0 +1,55 @@
++/*
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public License as
++ * published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
++ */
++
++#ifndef GLPAINTER_H
++#define GLPAINTER_H
++
++#include <QObject>
++#include <QTimer>
++#include <QPainter>
++#include <QMutex>
++#include <QThread>
++#include <QTimerEvent>
++#include <QPainter>
++
++class HostVideo;
++
++class GLPainter : public QObject
++{
++    Q_OBJECT
++public:
++    GLPainter(HostVideo *widget);
++    void stop();
++    void resizeViewport(const QSize &size);
++
++public slots:
++    void start();
++
++    void paintFrame(QImage frame);
++
++protected:
++    void paint();
++
++private:
++    QMutex mutex;
++    HostVideo *glWidget;
++    int viewportWidth;
++    int viewportHeight;
++    bool doRendering;
++
++    void paintFps(QPainter *painter);
++};
++
++#endif // GLPAINTER_H
+-- 
+1.8.1.2
+

++++++ 0011-Fix-settings-view-not-being-displayed.patch (new)
--- 0011-Fix-settings-view-not-being-displayed.patch
+++ 0011-Fix-settings-view-not-being-displayed.patch
@@ -0,0 +1,116 @@
+From c5ac4524655016e000756b89737a9586acece411 Mon Sep 17 00:00:00 2001
+From: Ruediger Gad <[email protected]>
+Date: Mon, 11 Feb 2013 23:31:49 +0100
+Subject: [PATCH 11/13] Fix settings view not being displayed.
+
+
+Signed-off-by: Ruediger Gad <[email protected]>
+---
+ qml/base/SettingsPage.qml | 16 ----------------
+ src/base/emuview.cpp      | 19 ++-----------------
+ src/base/emuview.h        |  6 ------
+ 3 files changed, 2 insertions(+), 39 deletions(-)
+
+diff --git a/qml/base/SettingsPage.qml b/qml/base/SettingsPage.qml
+index 9439650..e430d58 100644
+--- a/qml/base/SettingsPage.qml
++++ b/qml/base/SettingsPage.qml
+@@ -206,11 +206,6 @@ Page {
+                               }
+                               SettingsSwitchItem { text: qsTr("Show FPS"); 
paramName: "fpsVisible" }
+                               SettingsSwitchItem { text: qsTr("Keep Aspect 
Ratio"); paramName: "keepAspectRatio" }
+-                              SelectionItem {
+-                                      titleText: qsTr("Video Filter")
+-                                      subtitleText: emuView.videoFilter
+-                                      onClicked: videoFilterSelector.open()
+-                              }
+                       }
+ 
+                       Column {
+@@ -266,15 +261,4 @@ Page {
+               titleText: qsTr("Select Configuration")
+               onAccepted: inputDevice.emuFunction = selectedIndex
+       }
+-
+-      StringListProxy {
+-              id: videoFilterModel
+-              stringListModel: emuView.availableVideoFilters
+-      }
+-      SelectionDialog {
+-              id: videoFilterSelector
+-              model: videoFilterModel
+-              titleText: qsTr("Select Video Filter")
+-              onAccepted: emuView.videoFilter = 
videoFilterModel.get(selectedIndex)
+-      }
+ }
+diff --git a/src/base/emuview.cpp b/src/base/emuview.cpp
+index 8a9a787..3eb2d70 100644
+--- a/src/base/emuview.cpp
++++ b/src/base/emuview.cpp
+@@ -138,8 +138,7 @@ void EmuView::setupSettingsView()
+ {
+       m_settingsView = new QDeclarativeView(this);
+       m_settingsView->setViewport(new QGLWidget());
+-    //FIXME: Resize properly.
+-//    m_settingsView->resize(HostVideo::Width, HostVideo::Height);
++      m_settingsView->resize(QApplication::desktop()->width(), 
QApplication::desktop()->height());
+       QObject::connect(m_settingsView->engine(), SIGNAL(quit()), 
SLOT(close()));
+ 
+       m_settingsView->engine()->addImageProvider("state", new 
StateImageProvider(m_stateListModel));
+@@ -251,6 +250,7 @@ void EmuView::showSettingsView()
+       if (m_audioEnable)
+               m_hostAudio->close();
+       m_settingsView->setVisible(true);
++      m_settingsView->resize(QApplication::desktop()->width(), 
QApplication::desktop()->height());
+       m_settingsView->setFocus();
+       m_hostVideo->setVisible(false);
+       setSwipeEnabled(true);
+@@ -620,21 +620,6 @@ bool EmuView::areLRButtonsVisible() const
+       return m_lrButtonsVisible;
+ }
+ 
+-void EmuView::setVideoFilter(const QString &name)
+-{
+-    //FIXME: Remove
+-}
+-
+-QString EmuView::videoFilter() const
+-{
+-    //FIXME: Remove
+-}
+-
+-QStringList EmuView::availableVideoFilters() const
+-{
+-    //FIXME: Remove
+-}
+-
+ void EmuView::disableSafetyTimer()
+ {
+       m_safetyTimerDisabled = true;
+diff --git a/src/base/emuview.h b/src/base/emuview.h
+index 80d924c..f21752a 100644
+--- a/src/base/emuview.h
++++ b/src/base/emuview.h
+@@ -41,8 +41,6 @@ class BASE_EXPORT EmuView : public QWidget
+       Q_PROPERTY(bool lrButtonsVisible READ areLRButtonsVisible WRITE 
setLRButtonsVisible NOTIFY lrButtonsVisibleChanged)
+       Q_PROPERTY(QString error READ error CONSTANT)
+       Q_PROPERTY(QList<QObject *> inputDevices READ inputDevices NOTIFY 
inputDevicesChanged)
+-      Q_PROPERTY(QString videoFilter READ videoFilter WRITE setVideoFilter 
NOTIFY videoFilterChanged)
+-      Q_PROPERTY(QStringList availableVideoFilters READ availableVideoFilters 
CONSTANT)
+ public:
+       explicit EmuView(Emu *emu, const QString &diskFileName);
+       ~EmuView();
+@@ -69,10 +67,6 @@ public:
+ 
+       QString error() const;
+ 
+-      void setVideoFilter(const QString &name);
+-      QString videoFilter() const;
+-      QStringList availableVideoFilters() const;
+-
+       void disableSafetyTimer();
+ public slots:
+       bool close();
+-- 
+1.8.1.2
+

++++++ 0012-Fix-diskgallery-rendering-errors.patch (new)
--- 0012-Fix-diskgallery-rendering-errors.patch
+++ 0012-Fix-diskgallery-rendering-errors.patch
@@ -0,0 +1,31 @@
+From 127f9b623a276fa5b40976c2497162ce5074cf11 Mon Sep 17 00:00:00 2001
+From: Ruediger Gad <[email protected]>
+Date: Mon, 11 Feb 2013 23:32:14 +0100
+Subject: [PATCH 12/13] Fix diskgallery rendering errors.
+
+
+Signed-off-by: Ruediger Gad <[email protected]>
+---
+ qml/gallery/main.qml | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/qml/gallery/main.qml b/qml/gallery/main.qml
+index 0695c7d..8108555 100644
+--- a/qml/gallery/main.qml
++++ b/qml/gallery/main.qml
+@@ -22,12 +22,6 @@ PageStackWindow {
+       initialPage: mainPage
+       showStatusBar: false
+ 
+-      platformStyle: PageStackWindowStyle {
+-              id: customStyle;
+-              background: "image://theme/meegotouch-video-background"
+-              backgroundFillMode: Image.Stretch
+-              cornersVisible: false
+-      }
+       CollectionMenuPage { id: mainPage }
+       GalleryPage { id: galleryPage }
+ 
+-- 
+1.8.1.2
+

++++++ 0013-Remove-psx-from-diskgallery-as-this-is-right-now-not.patch (new)
--- 0013-Remove-psx-from-diskgallery-as-this-is-right-now-not.patch
+++ 0013-Remove-psx-from-diskgallery-as-this-is-right-now-not.patch
@@ -0,0 +1,27 @@
+From 789df7336cec6b3b0c01678dfcfa40a9f6652d12 Mon Sep 17 00:00:00 2001
+From: Ruediger Gad <[email protected]>
+Date: Tue, 12 Feb 2013 00:09:36 +0100
+Subject: [PATCH 13/13] Remove psx from diskgallery as this is right now not
+ supported.
+
+
+Signed-off-by: Ruediger Gad <[email protected]>
+---
+ qml/gallery/CollectionMenuPage.qml | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/qml/gallery/CollectionMenuPage.qml 
b/qml/gallery/CollectionMenuPage.qml
+index 4ec26d9..c0d7776 100644
+--- a/qml/gallery/CollectionMenuPage.qml
++++ b/qml/gallery/CollectionMenuPage.qml
+@@ -62,7 +62,6 @@ Page {
+                       CollectionTypeButton { name: "nes" }
+                       CollectionTypeButton { name: "snes" }
+                       CollectionTypeButton { name: "gba" }
+-                      CollectionTypeButton { name: "psx" }
+                       CollectionTypeButton { name: "amiga" }
+                       CollectionTypeButton { name: "pico" }
+               }
+-- 
+1.8.1.2
+

++++++ emumaster.yaml (new)
--- emumaster.yaml
+++ emumaster.yaml
@@ -0,0 +1,53 @@
+Name: emumaster
+Summary: An emulator for different gaming consoles etc.
+Version: 0.3.0
+Release: 1
+Group: Amusements/Games
+License: GPLv2
+URL: https://bitbucket.org/elemental/emumaster/wiki/Home
+ExclusiveArch: "armv7hl armv8el armv7l armv7el"
+Sources:
+    - "%{name}_%{version}.tar.gz"
+Patches:
+    - 0001-Remove-six-axis-controller-code.patch
+    - 0002-Remove-obsolete-check-in-diskgallery.patch
+    - 0003-Fix-gpp-maemo-scope-and-libs.patch
+    - 0004-Fix-home-directory-path.patch
+    - 0005-Remove-neon-specific-optimizations.patch
+    - 0006-Dynamically-determine-screensize-for-touchinput.patch
+    - 0007-Dynamically-determine-screensize-for-emuview.patch
+    - 0008-Remove-obsolete-members-from-HostVideo.patch
+    - 0009-Add-prototype-of-new-way-for-drawing-frames.patch
+    - 0010-Add-missing-glpainter.patch
+    - 0011-Fix-settings-view-not-being-displayed.patch
+    - 0012-Fix-diskgallery-rendering-errors.patch
+    - 0013-Remove-psx-from-diskgallery-as-this-is-right-now-not.patch
+
+Description:
+ EmuMaster emulates popular consoles. 
+ It is written in Qt/QML. 
+ Item at Nokia Store store.ovi.com/content/207988 
+ Donate version store.ovi.com/content/268920
+
+PkgConfigBR:
+    - QtCore >= 4.7.0
+    - QtGui
+    - qdeclarative-boostable
+    - QtOpenGL
+    - QtFeedback
+    - QtSensors
+    - QtSystemInfo
+    - QtNetwork
+    - qmsystem2
+    - libxml-2.0
+    - libpulse
+    - gstreamer-0.10
+Requires:
+    - libqtfeedback1
+Configure: none
+Builder: none
+Files:
+    - "%{_datadir}/applications/diskgallery.desktop"
+    - "%{_datadir}/policy/etc/syspart.conf.d/*"
+    - "/opt/%{name}"
+    - "/opt/emumaster/lib/libbase.so.1.0.0"

++++++ emumaster_0.3.0.tar.gz (new)



Reply via email to