2013-01-15 16:16:07 +00:00
|
|
|
#ifndef QTHOST_H
|
|
|
|
#define QTHOST_H
|
2013-01-13 23:29:42 +00:00
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include "../Core/Host.h"
|
|
|
|
#include "mainwindow.h"
|
|
|
|
|
2013-01-15 16:16:07 +00:00
|
|
|
#include "base/NativeApp.h"
|
|
|
|
#include "file/vfs.h"
|
|
|
|
#include "file/zip_read.h"
|
|
|
|
#include "gfx_es2/gl_state.h"
|
|
|
|
#include "gfx/texture.h"
|
|
|
|
#include "input/input_state.h"
|
|
|
|
#include "math/math_util.h"
|
2013-02-10 15:36:06 +00:00
|
|
|
#include "base/mutex.h"
|
2013-01-15 16:16:07 +00:00
|
|
|
#include "math/lin/matrix4x4.h"
|
|
|
|
#include <QGLWidget>
|
|
|
|
|
|
|
|
// Globals
|
|
|
|
static PMixer *g_mixer;
|
|
|
|
static QString fileToStart;
|
|
|
|
static QtEmuGL* glWindow;
|
|
|
|
|
|
|
|
class QtHost : public QObject, public Host
|
2013-01-13 23:29:42 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2013-01-15 16:16:07 +00:00
|
|
|
QtHost(MainWindow* mainWindow);
|
2013-01-13 23:29:42 +00:00
|
|
|
|
|
|
|
void UpdateMemView();
|
|
|
|
void UpdateDisassembly();
|
|
|
|
void UpdateUI();
|
|
|
|
void SetDebugMode(bool mode);
|
|
|
|
|
|
|
|
void AddSymbol(std::string name, u32 addr, u32 size, int type);
|
|
|
|
|
2013-03-11 07:30:38 +00:00
|
|
|
bool InitGL(std::string *error_string);
|
2013-01-13 23:29:42 +00:00
|
|
|
void BeginFrame();
|
|
|
|
void EndFrame();
|
|
|
|
void ShutdownGL();
|
|
|
|
|
|
|
|
void InitSound(PMixer *mixer);
|
2013-01-15 16:16:07 +00:00
|
|
|
void UpdateSound() { }
|
2013-01-13 23:29:42 +00:00
|
|
|
void ShutdownSound();
|
|
|
|
|
|
|
|
bool IsDebuggingEnabled();
|
|
|
|
void BootDone();
|
|
|
|
void PrepareShutdown();
|
|
|
|
bool AttemptLoadSymbolMap();
|
|
|
|
void SetWindowTitle(const char *message);
|
|
|
|
|
2013-02-10 15:36:06 +00:00
|
|
|
void SendCoreWait(bool);
|
|
|
|
bool GpuStep();
|
2013-02-17 17:25:43 +00:00
|
|
|
void SendGPUWait(u32 cmd, u32 addr, void* data);
|
2013-02-17 00:06:06 +00:00
|
|
|
void SendGPUStart();
|
2013-02-17 17:25:43 +00:00
|
|
|
void SetGPUStep(bool value, int flag = 0, int data = 0);
|
2013-02-10 15:36:06 +00:00
|
|
|
void NextGPUStep();
|
|
|
|
|
2013-01-13 23:29:42 +00:00
|
|
|
signals:
|
|
|
|
void BootDoneSignal();
|
|
|
|
private:
|
|
|
|
MainWindow* mainWindow;
|
2013-02-10 15:36:06 +00:00
|
|
|
bool m_GPUStep;
|
2013-02-17 00:06:06 +00:00
|
|
|
int m_GPUFlag;
|
2013-02-17 17:25:43 +00:00
|
|
|
int m_GPUData;
|
2013-01-13 23:29:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QTAPP_H
|