mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 07:20:49 +00:00
Fix Qt native file and remove redundancies.
This commit is contained in:
parent
063087abba
commit
02307d8226
@ -13,6 +13,9 @@
|
||||
#ifdef __SYMBIAN32__
|
||||
#include <AknAppUi.h>
|
||||
#endif
|
||||
#ifdef Q_WS_X11
|
||||
#include "mainwindow.h"
|
||||
#endif
|
||||
#include "QtMain.h"
|
||||
|
||||
void LaunchBrowser(const char *url)
|
||||
@ -52,6 +55,9 @@ float CalculateDPIScale()
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#ifdef Q_WS_X11
|
||||
QApplication::setAttribute(Qt::AA_X11InitThreads, true);
|
||||
#endif
|
||||
QApplication a(argc, argv);
|
||||
// Lock orientation to landscape on Symbian
|
||||
#ifdef __SYMBIAN32__
|
||||
@ -75,16 +81,24 @@ int main(int argc, char *argv[])
|
||||
NativeInit(argc, (const char **)argv, "E:/PPSSPP/", "E:", "BADCOFFEE");
|
||||
#elif defined(BLACKBERRY)
|
||||
NativeInit(argc, (const char **)argv, "data/", "/tmp", "BADCOFFEE");
|
||||
#elif defined(Q_WS_X11)
|
||||
// Temporary until ppsspp is fixed
|
||||
#else
|
||||
NativeInit(argc, (const char **)argv, "./", "/tmp", "BADCOFFEE");
|
||||
#endif
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
MainWindow mainWindow;
|
||||
mainWindow.show();
|
||||
mainWindow.Create(argc, (const char **)argv, "./", "/tmp", "BADCOFFEE");
|
||||
#else
|
||||
MainUI w(dpi_scale);
|
||||
w.resize(pixel_xres, pixel_yres);
|
||||
#ifdef USING_GLES2
|
||||
w.showFullScreen();
|
||||
#else
|
||||
w.show();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
MainAudio *audio = new MainAudio();
|
||||
|
@ -88,7 +88,7 @@ protected:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case QEvent::MouseButtonPress:
|
||||
case QEvent::MouseButtonRelease:
|
||||
input_state.pointer_down[0] = (e->type() == QEvent::MouseButtonPress);
|
||||
@ -161,11 +161,13 @@ public:
|
||||
output = new QAudioOutput(fmt);
|
||||
output->setNotifyInterval(1000*AUDIO_SAMPLES / AUDIO_FREQ);
|
||||
output->setBufferSize(mixlen);
|
||||
this->connect(output, SIGNAL(notify()), this, SLOT(writeData()));
|
||||
connect(output, SIGNAL(notify()), this, SLOT(writeData()));
|
||||
feed = output->start();
|
||||
}
|
||||
~MainAudio() {
|
||||
feed->close();
|
||||
delete feed;
|
||||
output->stop();
|
||||
delete output;
|
||||
free(mixbuf);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user