Notify user on use of procedural textures
This commit is contained in:
parent
ba0bfe7d82
commit
537eb99372
6 changed files with 28 additions and 2 deletions
|
@ -44,7 +44,11 @@ void EmuThread::run() {
|
||||||
if (!was_active)
|
if (!was_active)
|
||||||
emit DebugModeLeft();
|
emit DebugModeLeft();
|
||||||
|
|
||||||
|
try {
|
||||||
Core::RunLoop();
|
Core::RunLoop();
|
||||||
|
} catch (const char* str) {
|
||||||
|
emit UserError(str);
|
||||||
|
}
|
||||||
|
|
||||||
was_active = running || exec_step;
|
was_active = running || exec_step;
|
||||||
if (!was_active && !stop_run)
|
if (!was_active && !stop_run)
|
||||||
|
|
|
@ -78,6 +78,8 @@ signals:
|
||||||
* @warning When connecting to this signal from other threads, make sure to specify either Qt::QueuedConnection (invoke slot within the destination object's message thread) or even Qt::BlockingQueuedConnection (additionally block source thread until slot returns)
|
* @warning When connecting to this signal from other threads, make sure to specify either Qt::QueuedConnection (invoke slot within the destination object's message thread) or even Qt::BlockingQueuedConnection (additionally block source thread until slot returns)
|
||||||
*/
|
*/
|
||||||
void DebugModeLeft();
|
void DebugModeLeft();
|
||||||
|
|
||||||
|
void UserError(const char* str);
|
||||||
};
|
};
|
||||||
|
|
||||||
class GRenderWindow : public QWidget, public EmuWindow
|
class GRenderWindow : public QWidget, public EmuWindow
|
||||||
|
|
|
@ -219,6 +219,7 @@ void GMainWindow::BootGame(std::string filename) {
|
||||||
connect(emu_thread.get(), SIGNAL(DebugModeLeft()), disasmWidget, SLOT(OnDebugModeLeft()), Qt::BlockingQueuedConnection);
|
connect(emu_thread.get(), SIGNAL(DebugModeLeft()), disasmWidget, SLOT(OnDebugModeLeft()), Qt::BlockingQueuedConnection);
|
||||||
connect(emu_thread.get(), SIGNAL(DebugModeLeft()), registersWidget, SLOT(OnDebugModeLeft()), Qt::BlockingQueuedConnection);
|
connect(emu_thread.get(), SIGNAL(DebugModeLeft()), registersWidget, SLOT(OnDebugModeLeft()), Qt::BlockingQueuedConnection);
|
||||||
connect(emu_thread.get(), SIGNAL(DebugModeLeft()), callstackWidget, SLOT(OnDebugModeLeft()), Qt::BlockingQueuedConnection);
|
connect(emu_thread.get(), SIGNAL(DebugModeLeft()), callstackWidget, SLOT(OnDebugModeLeft()), Qt::BlockingQueuedConnection);
|
||||||
|
connect(emu_thread.get(), SIGNAL(UserError(const char*)), this, SLOT(OnUserError(const char*)));
|
||||||
|
|
||||||
// Update the GUI
|
// Update the GUI
|
||||||
registersWidget->OnDebugModeEntered();
|
registersWidget->OnDebugModeEntered();
|
||||||
|
@ -325,6 +326,11 @@ void GMainWindow::OnConfigure()
|
||||||
//GControllerConfigDialog* dialog = new GControllerConfigDialog(controller_ports, this);
|
//GControllerConfigDialog* dialog = new GControllerConfigDialog(controller_ports, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GMainWindow::OnUserError(const char* str)
|
||||||
|
{
|
||||||
|
QMessageBox::information(this, "Error", str);
|
||||||
|
}
|
||||||
|
|
||||||
void GMainWindow::closeEvent(QCloseEvent* event)
|
void GMainWindow::closeEvent(QCloseEvent* event)
|
||||||
{
|
{
|
||||||
// Save window layout
|
// Save window layout
|
||||||
|
|
|
@ -70,6 +70,7 @@ private slots:
|
||||||
void OnConfigure();
|
void OnConfigure();
|
||||||
void OnDisplayTitleBars(bool);
|
void OnDisplayTitleBars(bool);
|
||||||
void ToggleWindowMode();
|
void ToggleWindowMode();
|
||||||
|
void OnUserError(const char* str);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow ui;
|
Ui::MainWindow ui;
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
#include "vertex_shader.h"
|
#include "vertex_shader.h"
|
||||||
#include "video_core/utils.h"
|
#include "video_core/utils.h"
|
||||||
|
|
||||||
|
extern bool thrown;
|
||||||
|
|
||||||
namespace Pica {
|
namespace Pica {
|
||||||
|
|
||||||
namespace Rasterizer {
|
namespace Rasterizer {
|
||||||
|
@ -404,6 +406,13 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0,
|
||||||
case Source::Texture2:
|
case Source::Texture2:
|
||||||
return texture_color[2];
|
return texture_color[2];
|
||||||
|
|
||||||
|
case Source::Texture3:
|
||||||
|
if (!thrown) {
|
||||||
|
thrown = true;
|
||||||
|
throw "Uses procedural textures, tell bunnei!";
|
||||||
|
}
|
||||||
|
return{ 255, 0, 255, 255 };
|
||||||
|
|
||||||
case Source::PreviousBuffer:
|
case Source::PreviousBuffer:
|
||||||
return combiner_buffer;
|
return combiner_buffer;
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Video Core namespace
|
// Video Core namespace
|
||||||
|
|
||||||
|
bool thrown = false;
|
||||||
|
|
||||||
namespace VideoCore {
|
namespace VideoCore {
|
||||||
|
|
||||||
EmuWindow* g_emu_window = nullptr; ///< Frontend emulator window
|
EmuWindow* g_emu_window = nullptr; ///< Frontend emulator window
|
||||||
|
@ -26,6 +28,8 @@ void Init(EmuWindow* emu_window) {
|
||||||
g_renderer->SetWindow(g_emu_window);
|
g_renderer->SetWindow(g_emu_window);
|
||||||
g_renderer->Init();
|
g_renderer->Init();
|
||||||
|
|
||||||
|
thrown = false;
|
||||||
|
|
||||||
LOG_DEBUG(Render, "initialized OK");
|
LOG_DEBUG(Render, "initialized OK");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue