Improve Qt build. Fix for pandora build. Only show controls overlay by default for mobile platforms (Qt).

This commit is contained in:
Sacha 2013-01-15 01:13:53 +10:00
parent d2e370459e
commit dde656ddc6
11 changed files with 104 additions and 126 deletions

View File

@ -26,6 +26,7 @@
#include <signal.h>
#endif
#undef R0
#undef _SP
namespace ArmGen

View File

@ -23,7 +23,7 @@
#define INFO_LEVEL 4 // General information.
#define DEBUG_LEVEL 5 // Detailed debugging - might make things slow.
#ifndef _WIN32
#if !defined(_WIN32) && !defined(PANDORA)
#include <signal.h>
#endif

View File

@ -73,7 +73,12 @@ void CConfig::Load(const char *iniFileName)
IniFile::Section *control = iniFile.GetOrCreateSection("Control");
control->Get("ShowStick", &bShowAnalogStick, false);
control->Get("ShowTouchControls", &bShowTouchControls, true);
control->Get("ShowTouchControls", &bShowTouchControls,
#ifdef USING_GLES2
true);
#else
false);
#endif
// Ephemeral settings
bDrawWireframe = false;

View File

@ -84,7 +84,7 @@ void Core_Run()
#if defined(_DEBUG)
host->UpdateDisassembly();
#endif
#ifndef LINUX
#if !defined(USING_QT_UI) || defined(USING_GLES2)
while (true)
#endif
{
@ -103,7 +103,7 @@ reswitch:
if (coreState == CORE_POWERDOWN)
return;
if (coreState != CORE_STEPPING)
#ifdef LINUX
#if defined(USING_QT_UI) && !defined(USING_GLES2)
return;
#else
goto reswitch;

View File

@ -256,5 +256,3 @@ HEADERS += ../Core/CPU.h \
../ext/libkirk/AES.h \
../ext/libkirk/SHA1.h \
../ext/libkirk/kirk_engine.h

View File

@ -19,14 +19,13 @@
#include "qtemugl.h"
char fileToStart[MAX_PATH];
QString fileToStart;
QtEmuGL* glWindow;
void EmuThread_Start(const char *filename, QtEmuGL* w)
void EmuThread_Start(QString filename, QtEmuGL* w)
{
//_dbg_clear_();
strncpy(fileToStart, filename, sizeof(fileToStart) - 1);
fileToStart[sizeof(fileToStart) - 1] = 0;
fileToStart = filename;
glWindow = w;
w->start_rendering();
@ -40,8 +39,7 @@ void EmuThread_Stop()
host->UpdateUI();
}
char *GetCurrentFilename()
QString GetCurrentFilename()
{
return fileToStart;
}
@ -72,7 +70,7 @@ void EmuThread::run()
INFO_LOG(BOOT, "Starting up hardware.");
CoreParameter coreParameter;
coreParameter.fileToStart = fileToStart;
coreParameter.fileToStart = fileToStart.toStdString();
coreParameter.enableSound = true;
coreParameter.gpuCore = GPU_GLES;
coreParameter.cpuCore = (CPUCore)g_Config.iCpuCore;

View File

@ -21,7 +21,7 @@ private:
bool running;
};
void EmuThread_Start(const char *filename, QtEmuGL* glWindow);
void EmuThread_Start(QString filename, QtEmuGL* glWindow);
void EmuThread_Stop();
char *GetCurrentFilename();
QString GetCurrentFilename();

View File

@ -1,77 +1,73 @@
TARGET = PPSSPPQt
QT += core gui opengl
include(Settings.pri)
linux {
CONFIG += mobility
MOBILITY += multimedia
}
else {
QT += multimedia
}
# Libs
symbian: LIBS += -lCore.lib -lCommon.lib -lNative.lib -lcone -leikcore -lavkon -lezlib
blackberry: LIBS += -L. -lCore -lCommon -lNative -lscreen -lsocket -lstdc++
win32: LIBS += -L. -lCore -lCommon -lNative -lwinmm -lws2_32 -lkernel32 -luser32 -lgdi32 -lshell32 -lcomctl32 -ldsound -lxinput
linux: LIBS += -L. -lCore -lCommon -lNative
# Main
SOURCES += ../native/base/QtMain.cpp
linux {
SOURCES += mainwindow.cpp \
debugger_disasm.cpp \
EmuThread.cpp\
qtapp.cpp \
qtemugl.cpp \
ctrldisasmview.cpp \
ctrlregisterlist.cpp \
controls.cpp
}
HEADERS += ../native/base/QtMain.h
linux {
HEADERS += mainwindow.h \
debugger_disasm.h \
EmuThread.h \
qtapp.h \
qtemugl.h \
ctrldisasmview.h \
ctrlregisterlist.h \
ctrldisasmview.h \
ctrlregisterlist.h \
controls.h
}
# Native
SOURCES += ../android/jni/NativeApp.cpp \
../android/jni/EmuScreen.cpp \
../android/jni/MenuScreens.cpp \
../android/jni/GamepadEmu.cpp \
../android/jni/UIShader.cpp \
../android/jni/ui_atlas.cpp
INCLUDEPATH += .. ../Common ../native
# Packaging
symbian {
vendorinfo = "%{\"Qtness\"}" ":\"Qtness\""
packageheader = "$${LITERAL_HASH}{\"PPSSPP\"}, (0xE0095B1D), 0, 0, 5, TYPE=SA"
my_deployment.pkg_prerules = packageheader vendorinfo
assets.sources = ../android/assets/ui_atlas.zim ../android/assets/ppge_atlas.zim
assets.path = E:/PPSSPP
DEPLOYMENT += my_deployment assets
ICON = ../assets/icon.svg
# 268MB maximum
TARGET.EPOCHEAPSIZE = 0x40000 0x10000000
TARGET.EPOCSTACKSIZE = 0x10000
}
linux {
FORMS += mainwindow.ui \
debugger_disasm.ui \
controls.ui
}
TARGET = PPSSPPQt
QT += core gui opengl
include(Settings.pri)
linux {
CONFIG += mobility
MOBILITY += multimedia
}
else {
QT += multimedia
}
# Libs
symbian: LIBS += -lCore.lib -lCommon.lib -lNative.lib -lcone -leikcore -lavkon -lezlib
blackberry: LIBS += -L. -lCore -lCommon -lNative -lscreen -lsocket -lstdc++
win32: LIBS += -L. -lCore -lCommon -lNative -lwinmm -lws2_32 -lkernel32 -luser32 -lgdi32 -lshell32 -lcomctl32 -ldsound -lxinput
linux: LIBS += -L. -lCore -lCommon -lNative
# Main
SOURCES += ../native/base/QtMain.cpp
HEADERS += ../native/base/QtMain.h
# Native
SOURCES += ../android/jni/NativeApp.cpp \
../android/jni/EmuScreen.cpp \
../android/jni/MenuScreens.cpp \
../android/jni/GamepadEmu.cpp \
../android/jni/UIShader.cpp \
../android/jni/ui_atlas.cpp
INCLUDEPATH += .. ../Common ../native
linux:!mobile_platform {
SOURCES += mainwindow.cpp \
debugger_disasm.cpp \
EmuThread.cpp\
qtapp.cpp \
qtemugl.cpp \
ctrldisasmview.cpp \
ctrlregisterlist.cpp \
controls.cpp
HEADERS += mainwindow.h \
debugger_disasm.h \
EmuThread.h \
qtapp.h \
qtemugl.h \
ctrldisasmview.h \
ctrlregisterlist.h \
controls.h
}
# Packaging
symbian {
vendorinfo = "%{\"Qtness\"}" ":\"Qtness\""
packageheader = "$${LITERAL_HASH}{\"PPSSPP\"}, (0xE0095B1D), 0, 0, 5, TYPE=SA"
my_deployment.pkg_prerules = packageheader vendorinfo
assets.sources = ../android/assets/ui_atlas.zim ../android/assets/ppge_atlas.zim
assets.path = E:/PPSSPP
DEPLOYMENT += my_deployment assets
ICON = ../assets/icon.svg
# 268MB maximum
TARGET.EPOCHEAPSIZE = 0x40000 0x10000000
TARGET.EPOCSTACKSIZE = 0x10000
}
linux:!mobile_platform {
FORMS += mainwindow.ui \
debugger_disasm.ui \
controls.ui
}

View File

@ -31,6 +31,4 @@ symbian: {
DEFINES += SYMBIAN
CONFIG += 4.6.3
}
linux: {
DEFINES += LINUX
}

View File

@ -213,15 +213,9 @@ void MainWindow::SetNextState(CoreState state)
void MainWindow::BrowseAndBoot(void)
{
QFileDialog dialog(0,"Load File");
dialog.setFileMode(QFileDialog::ExistingFile);
dialog.setNameFilter("PSP (*.pbp *.elf *.iso *.cso *.prx)");
QStringList fileNames;
if (dialog.exec())
{
fileNames = dialog.selectedFiles();
EmuThread_Start(fileNames.at(0).toAscii(), w);
}
QString filename = QFileDialog::getOpenFileName(NULL, "Load File", g_Config.currentDirectory.c_str(), "PSP ROMs (*.pbp *.elf *.iso *.cso *.prx)");
if (QFile::exists(filename))
EmuThread_Start(filename, w);
}
void MainWindow::Boot()

View File

@ -1,3 +1,5 @@
#include <QFileInfo>
#include "qtapp.h"
#include "EmuThread.h"
#include "Core/Debugger/SymbolMap.h"
@ -31,7 +33,7 @@ void QtApp::SetWindowTitle(const char *message)
void QtApp::InitSound(PMixer *mixer)
{
NativeSetMixer(mixer);
// NativeSetMixer(mixer);
}
void QtApp::UpdateSound()
@ -40,7 +42,7 @@ void QtApp::UpdateSound()
void QtApp::ShutdownSound()
{
NativeSetMixer(0);
// NativeSetMixer(0);
}
void QtApp::UpdateUI()
@ -94,30 +96,16 @@ void QtApp::BootDone()
bool QtApp::AttemptLoadSymbolMap()
{
char filename[256];
strcpy(filename, GetCurrentFilename());
int len = strlen(filename);
int ptpos = len-1;
while (filename[ptpos]!='.' && ptpos>len-8)
ptpos--;
filename[ptpos+1] = 'm';
filename[ptpos+2] = 'a';
filename[ptpos+3] = 'p';
return symbolMap.LoadSymbolMap(filename);
QFileInfo currentFile(GetCurrentFilename());
QString ret = currentFile.baseName() + ".map";
return symbolMap.LoadSymbolMap(ret.toAscii().constData());
}
void QtApp::PrepareShutdown()
{
char filename[256];
strcpy(filename, GetCurrentFilename());
int len = strlen(filename);
int ptpos = len-1;
while (filename[ptpos]!='.' && ptpos>len-8)
ptpos--;
filename[ptpos+1] = 'm';
filename[ptpos+2] = 'a';
filename[ptpos+3] = 'p';
symbolMap.SaveSymbolMap(filename);
QFileInfo currentFile(GetCurrentFilename());
QString ret = currentFile.baseName() + ".map";
symbolMap.SaveSymbolMap(ret.toAscii().constData());
}
void QtApp::AddSymbol(std::string name, u32 addr, u32 size, int type=0)