Merge pull request #1149 from xsacha/master

Buildfix for Qt
This commit is contained in:
Henrik Rydgård committed 2013-04-01 06:28:26 -07:00
commit e95b43a12d
3 files changed
+19 -26

No files matched your search

+4 -9
View File
@@ -178,8 +178,6 @@ void EmuThread::run()
EmuThread_LockDraw(true);
if(needInitGame)
{
g_State.bEmuThreadStarted = true;
CoreParameter coreParameter;
coreParameter.fileToStart = fileToStart.toStdString();
coreParameter.enableSound = true;
@@ -211,7 +209,6 @@ void EmuThread::run()
host->UpdateDisassembly();
Core_EnableStepping(coreParameter.startPaused ? TRUE : FALSE);
g_State.bBooted = true;
#ifdef _DEBUG
host->UpdateMemView();
#endif
@@ -255,14 +252,14 @@ void EmuThread::run()
glViewport(0, 0, pixel_xres, pixel_yres);
ui_draw2d.Begin(DBMODE_NORMAL);
ui_draw2d.Begin(UIShader_Get(), DBMODE_NORMAL);
//if (g_Config.bShowTouchControls)
// DrawGamepad(ui_draw2d);
glsl_bind(UIShader_Get());
ui_draw2d.End();
ui_draw2d.Flush(UIShader_Get());
ui_draw2d.Flush();
// Tiled renderers like PowerVR should benefit greatly from this. However - seems I can't call it?
@@ -302,7 +299,7 @@ void EmuThread::run()
UIShader_Prepare();
glViewport(0, 0, pixel_xres, pixel_yres);
UIBegin();
UIBegin(UIShader_Get());
DrawBackground(alpha);
ui_draw2d.SetFontScale(1.5f, 1.5f);
@@ -315,7 +312,7 @@ void EmuThread::run()
UIEnd();
glsl_bind(UIShader_Get());
ui_draw2d.Flush(UIShader_Get());
ui_draw2d.Flush();
glWindow->swapBuffers();
EmuThread_LockDraw(false);
@@ -339,7 +336,6 @@ void EmuThread::run()
void EmuThread::Shutdown()
{
host->PrepareShutdown();
FinalShutdown();
}
void EmuThread::FinalShutdown()
@@ -384,7 +380,6 @@ void EmuThread::stopGame()
// TODO
//The CPU should return when a game is stopped and cleanup should be done here,
//so we can restart the plugins (or load new ones) for the next game
g_State.bEmuThreadStarted = false;
frames_ = 0;
gameMutex->unlock();
+8 -6
View File
@@ -8,10 +8,10 @@
#include "Core/Debugger/SymbolMap.h"
#include "Core/Config.h"
#include "base/NativeApp.h"
#include "android/jni/MenuScreens.h"
#include "android/jni/EmuScreen.h"
#include "android/jni/UIShader.h"
#include "android/jni/ui_atlas.h"
#include "UI/MenuScreens.h"
#include "UI/EmuScreen.h"
#include "UI/UIShader.h"
#include "UI/ui_atlas.h"
#include "GPU/ge_constants.h"
#include "EmuThread.h"
@@ -211,10 +211,12 @@ void QtHost::NextGPUStep()
m_hGPUStepEvent.notify_one();
}
void NativeMix(short *audio, int num_samples)
int NativeMix(short *audio, int num_samples)
{
if (g_mixer)
g_mixer->Mix(audio, num_samples);
return g_mixer->Mix(audio, num_samples);
else
return 0;
}
void NativeInitGraphics()
+7 -11
View File
@@ -194,8 +194,7 @@ void MainWindow::Update()
void MainWindow::UpdateMenus()
{
// enabling
bool enable = g_State.bEmuThreadStarted ? false : true;
bool enable = false;
ui->action_FileLoad->setEnabled(enable);
ui->action_FileClose->setEnabled(!enable);
ui->action_FileSaveStateFile->setEnabled(!enable);
@@ -212,9 +211,9 @@ void MainWindow::UpdateMenus()
ui->action_DebugDisplayList->setEnabled(!enable);
enable = !Core_IsStepping() ? false : true;
ui->action_EmulationRun->setEnabled(g_State.bEmuThreadStarted ? enable : false);
ui->action_EmulationPause->setEnabled(g_State.bEmuThreadStarted ? !enable : false);
ui->action_EmulationReset->setEnabled(g_State.bEmuThreadStarted ? true : false);
ui->action_EmulationRun->setEnabled(false);
ui->action_EmulationPause->setEnabled(true);
ui->action_EmulationReset->setEnabled(true);
// checking
ui->action_EmulationRunLoad->setChecked(g_Config.bAutoRun);
@@ -419,13 +418,10 @@ void MainWindow::on_action_FileExit_triggered()
void MainWindow::on_action_EmulationRun_triggered()
{
if (g_State.bEmuThreadStarted)
if(dialogDisasm)
{
if(dialogDisasm)
{
dialogDisasm->Stop();
dialogDisasm->Go();
}
dialogDisasm->Stop();
dialogDisasm->Go();
}
}