2014-10-26 16:38:40 +01:00
|
|
|
// Copyright 2014 Citra Emulator Project
|
2014-12-17 06:38:14 +01:00
|
|
|
// Licensed under GPLv2 or any later version
|
2014-10-26 16:38:40 +01:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QDockWidget>
|
|
|
|
|
2014-12-19 19:22:44 +01:00
|
|
|
#include "graphics_breakpoint_observer.h"
|
2014-10-26 16:38:40 +01:00
|
|
|
|
|
|
|
class QComboBox;
|
|
|
|
class QLabel;
|
|
|
|
class QSpinBox;
|
|
|
|
|
|
|
|
class CSpinBox;
|
|
|
|
|
|
|
|
class GraphicsFramebufferWidget : public BreakPointObserverDock {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
using Event = Pica::DebugContext::Event;
|
|
|
|
|
|
|
|
enum class Source {
|
|
|
|
PicaTarget = 0,
|
|
|
|
Custom = 1,
|
|
|
|
|
|
|
|
// TODO: Add GPU framebuffer sources!
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class Format {
|
|
|
|
RGBA8 = 0,
|
|
|
|
RGB8 = 1,
|
|
|
|
RGBA5551 = 2,
|
|
|
|
RGB565 = 3,
|
|
|
|
RGBA4 = 4,
|
|
|
|
};
|
|
|
|
|
|
|
|
public:
|
|
|
|
GraphicsFramebufferWidget(std::shared_ptr<Pica::DebugContext> debug_context, QWidget* parent = nullptr);
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void OnFramebufferSourceChanged(int new_value);
|
|
|
|
void OnFramebufferAddressChanged(qint64 new_value);
|
2015-01-10 21:35:26 +01:00
|
|
|
void OnFramebufferWidthChanged(int new_value);
|
|
|
|
void OnFramebufferHeightChanged(int new_value);
|
2014-10-26 16:38:40 +01:00
|
|
|
void OnFramebufferFormatChanged(int new_value);
|
|
|
|
void OnUpdate();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void OnBreakPointHit(Pica::DebugContext::Event event, void* data) override;
|
|
|
|
void OnResumed() override;
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void Update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
QComboBox* framebuffer_source_list;
|
|
|
|
CSpinBox* framebuffer_address_control;
|
|
|
|
QSpinBox* framebuffer_width_control;
|
|
|
|
QSpinBox* framebuffer_height_control;
|
|
|
|
QComboBox* framebuffer_format_control;
|
|
|
|
|
|
|
|
QLabel* framebuffer_picture_label;
|
|
|
|
|
|
|
|
Source framebuffer_source;
|
|
|
|
unsigned framebuffer_address;
|
|
|
|
unsigned framebuffer_width;
|
|
|
|
unsigned framebuffer_height;
|
|
|
|
Format framebuffer_format;
|
|
|
|
};
|