mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-24 06:51:05 +00:00
Notify user on use of procedural textures
This commit is contained in:
parent
ba0bfe7d82
commit
537eb99372
@ -44,8 +44,12 @@ void EmuThread::run() {
|
||||
if (!was_active)
|
||||
emit DebugModeLeft();
|
||||
|
||||
Core::RunLoop();
|
||||
|
||||
try {
|
||||
Core::RunLoop();
|
||||
} catch (const char* str) {
|
||||
emit UserError(str);
|
||||
}
|
||||
|
||||
was_active = running || exec_step;
|
||||
if (!was_active && !stop_run)
|
||||
emit DebugModeEntered();
|
||||
|
@ -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)
|
||||
*/
|
||||
void DebugModeLeft();
|
||||
|
||||
void UserError(const char* str);
|
||||
};
|
||||
|
||||
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()), registersWidget, 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
|
||||
registersWidget->OnDebugModeEntered();
|
||||
@ -325,6 +326,11 @@ void GMainWindow::OnConfigure()
|
||||
//GControllerConfigDialog* dialog = new GControllerConfigDialog(controller_ports, this);
|
||||
}
|
||||
|
||||
void GMainWindow::OnUserError(const char* str)
|
||||
{
|
||||
QMessageBox::information(this, "Error", str);
|
||||
}
|
||||
|
||||
void GMainWindow::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
// Save window layout
|
||||
|
@ -70,6 +70,7 @@ private slots:
|
||||
void OnConfigure();
|
||||
void OnDisplayTitleBars(bool);
|
||||
void ToggleWindowMode();
|
||||
void OnUserError(const char* str);
|
||||
|
||||
private:
|
||||
Ui::MainWindow ui;
|
||||
|
@ -16,6 +16,8 @@
|
||||
#include "vertex_shader.h"
|
||||
#include "video_core/utils.h"
|
||||
|
||||
extern bool thrown;
|
||||
|
||||
namespace Pica {
|
||||
|
||||
namespace Rasterizer {
|
||||
@ -404,6 +406,13 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0,
|
||||
case Source::Texture2:
|
||||
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:
|
||||
return combiner_buffer;
|
||||
|
||||
|
@ -14,6 +14,8 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Video Core namespace
|
||||
|
||||
bool thrown = false;
|
||||
|
||||
namespace VideoCore {
|
||||
|
||||
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->Init();
|
||||
|
||||
thrown = false;
|
||||
|
||||
LOG_DEBUG(Render, "initialized OK");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user