Global: Cleanup virtual/override specifiers.

Also missing virtual destructors, hidden non-overrides, etc.
This commit is contained in:
Unknown W. Brackets 2022-12-10 20:32:12 -08:00
parent 31efd9565e
commit f44852bb18
83 changed files with 283 additions and 315 deletions

View File

@ -57,7 +57,10 @@ private:
public: public:
CodeBlock() {} CodeBlock() {}
virtual ~CodeBlock() { if (region) FreeCodeSpace(); } ~CodeBlock() {
if (region)
FreeCodeSpace();
}
// Call this before you generate any code. // Call this before you generate any code.
void AllocCodeSpace(int size) { void AllocCodeSpace(int size) {

View File

@ -41,7 +41,7 @@ public:
#if defined(USING_WIN_UI) #if defined(USING_WIN_UI)
COORD GetCoordinates(int BytesRead, int BufferWidth); COORD GetCoordinates(int BytesRead, int BufferWidth);
#endif #endif
void Log(const LogMessage &message); void Log(const LogMessage &message) override;
void ClearScreen(bool Cursor = true); void ClearScreen(bool Cursor = true);
void Show(bool bShow); void Show(bool bShow);

View File

@ -7,6 +7,7 @@ public:
WordWrapper(const char *str, float maxW, int flags) WordWrapper(const char *str, float maxW, int flags)
: str_(str), maxW_(maxW), flags_(flags) { : str_(str), maxW_(maxW), flags_(flags) {
} }
virtual ~WordWrapper() {}
std::string Wrapped(); std::string Wrapped();

View File

@ -47,10 +47,10 @@ class DirectoryAssetReader : public AssetReader {
public: public:
explicit DirectoryAssetReader(const Path &path); explicit DirectoryAssetReader(const Path &path);
// use delete[] // use delete[]
virtual uint8_t *ReadAsset(const char *path, size_t *size); uint8_t *ReadAsset(const char *path, size_t *size) override;
virtual bool GetFileListing(const char *path, std::vector<File::FileInfo> *listing, const char *filter); bool GetFileListing(const char *path, std::vector<File::FileInfo> *listing, const char *filter) override;
virtual bool GetFileInfo(const char *path, File::FileInfo *info); bool GetFileInfo(const char *path, File::FileInfo *info) override;
virtual std::string toString() const { std::string toString() const override {
return path_.ToString(); return path_.ToString();
} }

View File

@ -291,7 +291,7 @@ public:
D3D9Texture(LPDIRECT3DDEVICE9 device, LPDIRECT3DDEVICE9EX deviceEx, const TextureDesc &desc); D3D9Texture(LPDIRECT3DDEVICE9 device, LPDIRECT3DDEVICE9EX deviceEx, const TextureDesc &desc);
~D3D9Texture(); ~D3D9Texture();
void SetToSampler(LPDIRECT3DDEVICE9 device, int sampler); void SetToSampler(LPDIRECT3DDEVICE9 device, int sampler);
LPDIRECT3DBASETEXTURE9 Texture() const { LPDIRECT3DBASETEXTURE9 TexturePtr() const {
// TODO: Cleanup // TODO: Cleanup
if (tex_) { if (tex_) {
return tex_; return tex_;
@ -590,7 +590,7 @@ public:
case NativeObject::DEVICE_EX: case NativeObject::DEVICE_EX:
return (uint64_t)(uintptr_t)deviceEx_; return (uint64_t)(uintptr_t)deviceEx_;
case NativeObject::TEXTURE_VIEW: case NativeObject::TEXTURE_VIEW:
return (uint64_t)(((D3D9Texture *)srcObject)->Texture()); return (uint64_t)(((D3D9Texture *)srcObject)->TexturePtr());
default: default:
return 0; return 0;
} }
@ -1007,7 +1007,7 @@ public:
device->CreateVertexBuffer((UINT)size, usage, 0, D3DPOOL_DEFAULT, &vbuffer_, NULL); device->CreateVertexBuffer((UINT)size, usage, 0, D3DPOOL_DEFAULT, &vbuffer_, NULL);
} }
} }
virtual ~D3D9Buffer() override { ~D3D9Buffer() {
if (ibuffer_) { if (ibuffer_) {
ibuffer_->Release(); ibuffer_->Release();
} }

View File

@ -324,7 +324,7 @@ class OpenGLTexture;
class OpenGLContext : public DrawContext { class OpenGLContext : public DrawContext {
public: public:
OpenGLContext(); OpenGLContext();
virtual ~OpenGLContext(); ~OpenGLContext();
void SetTargetSize(int w, int h) override { void SetTargetSize(int w, int h) override {
DrawContext::SetTargetSize(w, h); DrawContext::SetTargetSize(w, h);
@ -1084,7 +1084,7 @@ public:
buffer_ = render->CreateBuffer(target_, size, usage_); buffer_ = render->CreateBuffer(target_, size, usage_);
totalSize_ = size; totalSize_ = size;
} }
~OpenGLBuffer() override { ~OpenGLBuffer() {
render_->DeleteBuffer(buffer_); render_->DeleteBuffer(buffer_);
} }

View File

@ -382,7 +382,7 @@ class VKFramebuffer;
class VKContext : public DrawContext { class VKContext : public DrawContext {
public: public:
VKContext(VulkanContext *vulkan); VKContext(VulkanContext *vulkan);
virtual ~VKContext(); ~VKContext();
void DebugAnnotate(const char *annotation) override; void DebugAnnotate(const char *annotation) override;
@ -1362,7 +1362,7 @@ public:
VKBuffer(size_t size, uint32_t flags) : dataSize_(size) { VKBuffer(size_t size, uint32_t flags) : dataSize_(size) {
data_ = new uint8_t[size]; data_ = new uint8_t[size];
} }
~VKBuffer() override { ~VKBuffer() {
delete[] data_; delete[] data_;
} }

View File

@ -483,10 +483,7 @@ public:
virtual ShaderStage GetStage() const = 0; virtual ShaderStage GetStage() const = 0;
}; };
class Pipeline : public RefCountedObject { class Pipeline : public RefCountedObject { };
public:
virtual ~Pipeline() {}
};
class RasterState : public RefCountedObject {}; class RasterState : public RefCountedObject {};

View File

@ -55,7 +55,7 @@ public:
FileLogListener(const char *filename); FileLogListener(const char *filename);
~FileLogListener(); ~FileLogListener();
void Log(const LogMessage &msg); void Log(const LogMessage &msg) override;
bool IsValid() { if (!fp_) return false; else return true; } bool IsValid() { if (!fp_) return false; else return true; }
bool IsEnabled() const { return m_enable; } bool IsEnabled() const { return m_enable; }
@ -71,13 +71,12 @@ private:
class OutputDebugStringLogListener : public LogListener { class OutputDebugStringLogListener : public LogListener {
public: public:
void Log(const LogMessage &msg); void Log(const LogMessage &msg) override;
}; };
class RingbufferLogListener : public LogListener { class RingbufferLogListener : public LogListener {
public: public:
RingbufferLogListener() : curMessage_(0), count_(0), enabled_(false) {} void Log(const LogMessage &msg) override;
void Log(const LogMessage &msg);
bool IsEnabled() const { return enabled_; } bool IsEnabled() const { return enabled_; }
void SetEnabled(bool enable) { enabled_ = enable; } void SetEnabled(bool enable) { enabled_ = enable; }
@ -89,9 +88,9 @@ public:
private: private:
enum { MAX_LOGS = 128 }; enum { MAX_LOGS = 128 };
LogMessage messages_[MAX_LOGS]; LogMessage messages_[MAX_LOGS];
int curMessage_; int curMessage_ = 0;
int count_; int count_ = 0;
bool enabled_; bool enabled_ = false;
}; };
// TODO: A simple buffered log that can be used to display the log in-window // TODO: A simple buffered log that can be used to display the log in-window

View File

@ -15,6 +15,7 @@ enum ExpressionType
class IExpressionFunctions class IExpressionFunctions
{ {
public: public:
virtual ~IExpressionFunctions() {}
virtual bool parseReference(char* str, uint32_t& referenceIndex) = 0; virtual bool parseReference(char* str, uint32_t& referenceIndex) = 0;
virtual bool parseSymbol(char* str, uint32_t& symbolValue) = 0; virtual bool parseSymbol(char* str, uint32_t& symbolValue) = 0;
virtual uint32_t getReferenceValue(uint32_t referenceIndex) = 0; virtual uint32_t getReferenceValue(uint32_t referenceIndex) = 0;

View File

@ -15,6 +15,8 @@
struct UrlEncoder struct UrlEncoder
{ {
virtual ~UrlEncoder() {}
UrlEncoder() : paramCount(0) UrlEncoder() : paramCount(0)
{ {
data.reserve(256); data.reserve(256);
@ -129,8 +131,7 @@ struct MultipartFormDataEncoder : UrlEncoder
boundary = temp; boundary = temp;
} }
virtual void Add(const std::string &key, const std::string &value) void Add(const std::string &key, const std::string &value) override {
{
Add(key, value, "", ""); Add(key, value, "", "");
} }
@ -158,13 +159,11 @@ struct MultipartFormDataEncoder : UrlEncoder
Add(key, std::string((const char *)&value[0], value.size()), filename, mimeType); Add(key, std::string((const char *)&value[0], value.size()), filename, mimeType);
} }
virtual void Finish() void Finish() override {
{
data += "--" + boundary + "--"; data += "--" + boundary + "--";
} }
virtual std::string GetMimeType() const std::string GetMimeType() const override {
{
return "multipart/form-data; boundary=\"" + boundary + "\""; return "multipart/form-data; boundary=\"" + boundary + "\"";
} }

View File

@ -43,6 +43,7 @@ extern DrawBuffer ui_draw2d_front; // for things that need to be on top of the r
// Implement this interface to style your lists // Implement this interface to style your lists
class UIListAdapter { class UIListAdapter {
public: public:
virtual ~UIListAdapter() {}
virtual size_t getCount() const = 0; virtual size_t getCount() const = 0;
virtual void drawItem(int item, int x, int y, int w, int h, bool active) const = 0; virtual void drawItem(int item, int x, int y, int w, int h, bool active) const = 0;
virtual float itemHeight(int itemIndex) const { return 64; } virtual float itemHeight(int itemIndex) const { return 64; }
@ -52,8 +53,8 @@ public:
class StringVectorListAdapter : public UIListAdapter { class StringVectorListAdapter : public UIListAdapter {
public: public:
StringVectorListAdapter(const std::vector<std::string> *items) : items_(items) {} StringVectorListAdapter(const std::vector<std::string> *items) : items_(items) {}
virtual size_t getCount() const { return items_->size(); } size_t getCount() const override { return items_->size(); }
virtual void drawItem(int item, int x, int y, int w, int h, bool active) const; void drawItem(int item, int x, int y, int w, int h, bool active) const override;
private: private:
const std::vector<std::string> *items_; const std::vector<std::string> *items_;

View File

@ -74,12 +74,12 @@ public:
PopupScreen(std::string title, std::string button1 = "", std::string button2 = ""); PopupScreen(std::string title, std::string button1 = "", std::string button2 = "");
virtual void CreatePopupContents(UI::ViewGroup *parent) = 0; virtual void CreatePopupContents(UI::ViewGroup *parent) = 0;
virtual void CreateViews() override; void CreateViews() override;
virtual bool isTransparent() const override { return true; } bool isTransparent() const override { return true; }
virtual bool touch(const TouchInput &touch) override; bool touch(const TouchInput &touch) override;
virtual bool key(const KeyInput &key) override; bool key(const KeyInput &key) override;
virtual void TriggerFinish(DialogResult result) override; void TriggerFinish(DialogResult result) override;
void SetPopupOrigin(const UI::View *view); void SetPopupOrigin(const UI::View *view);
void SetPopupOffset(float y); void SetPopupOffset(float y);
@ -95,7 +95,7 @@ protected:
virtual bool HasTitleBar() const { return true; } virtual bool HasTitleBar() const { return true; }
const std::string &Title() { return title_; } const std::string &Title() { return title_; }
virtual void update() override; void update() override;
private: private:
UI::ViewGroup *box_; UI::ViewGroup *box_;
@ -143,9 +143,9 @@ public:
UI::Event OnChoice; UI::Event OnChoice;
protected: protected:
virtual bool FillVertical() const override { return false; } bool FillVertical() const override { return false; }
virtual bool ShowButtons() const override { return showButtons_; } bool ShowButtons() const override { return showButtons_; }
virtual void CreatePopupContents(UI::ViewGroup *parent) override; void CreatePopupContents(UI::ViewGroup *parent) override;
UI::StringVectorListAdaptor adaptor_; UI::StringVectorListAdaptor adaptor_;
UI::ListView *listView_ = nullptr; UI::ListView *listView_ = nullptr;
@ -164,9 +164,9 @@ public:
UI::Event OnChoice; UI::Event OnChoice;
protected: protected:
virtual bool FillVertical() const override { return false; } bool FillVertical() const override { return false; }
virtual bool ShowButtons() const override { return true; } bool ShowButtons() const override { return true; }
virtual void CreatePopupContents(UI::ViewGroup *parent) override; void CreatePopupContents(UI::ViewGroup *parent) override;
private: private:
void OnCompleted(DialogResult result) override; void OnCompleted(DialogResult result) override;
@ -182,7 +182,7 @@ class SliderPopupScreen : public PopupScreen {
public: public:
SliderPopupScreen(int *value, int minValue, int maxValue, const std::string &title, int step = 1, const std::string &units = "") SliderPopupScreen(int *value, int minValue, int maxValue, const std::string &title, int step = 1, const std::string &units = "")
: PopupScreen(title, "OK", "Cancel"), units_(units), value_(value), minValue_(minValue), maxValue_(maxValue), step_(step) {} : PopupScreen(title, "OK", "Cancel"), units_(units), value_(value), minValue_(minValue), maxValue_(maxValue), step_(step) {}
virtual void CreatePopupContents(ViewGroup *parent) override; void CreatePopupContents(ViewGroup *parent) override;
void SetNegativeDisable(const std::string &str) { void SetNegativeDisable(const std::string &str) {
negativeLabel_ = str; negativeLabel_ = str;
@ -198,7 +198,7 @@ private:
EventReturn OnIncrease(EventParams &params); EventReturn OnIncrease(EventParams &params);
EventReturn OnTextChange(EventParams &params); EventReturn OnTextChange(EventParams &params);
EventReturn OnSliderChange(EventParams &params); EventReturn OnSliderChange(EventParams &params);
virtual void OnCompleted(DialogResult result) override; void OnCompleted(DialogResult result) override;
Slider *slider_ = nullptr; Slider *slider_ = nullptr;
UI::TextEdit *edit_ = nullptr; UI::TextEdit *edit_ = nullptr;
std::string units_; std::string units_;
@ -227,7 +227,7 @@ private:
EventReturn OnDecrease(EventParams &params); EventReturn OnDecrease(EventParams &params);
EventReturn OnTextChange(EventParams &params); EventReturn OnTextChange(EventParams &params);
EventReturn OnSliderChange(EventParams &params); EventReturn OnSliderChange(EventParams &params);
virtual void OnCompleted(DialogResult result) override; void OnCompleted(DialogResult result) override;
UI::SliderFloat *slider_; UI::SliderFloat *slider_;
UI::TextEdit *edit_; UI::TextEdit *edit_;
std::string units_; std::string units_;
@ -245,7 +245,7 @@ class TextEditPopupScreen : public PopupScreen {
public: public:
TextEditPopupScreen(std::string *value, const std::string &placeholder, const std::string &title, int maxLen) TextEditPopupScreen(std::string *value, const std::string &placeholder, const std::string &title, int maxLen)
: PopupScreen(title, "OK", "Cancel"), value_(value), placeholder_(placeholder), maxLen_(maxLen) {} : PopupScreen(title, "OK", "Cancel"), value_(value), placeholder_(placeholder), maxLen_(maxLen) {}
virtual void CreatePopupContents(ViewGroup *parent) override; void CreatePopupContents(ViewGroup *parent) override;
const char *tag() const override { return "TextEditPopup"; } const char *tag() const override { return "TextEditPopup"; }
@ -378,7 +378,7 @@ public:
} }
protected: protected:
void PostChoiceCallback(int num) { void PostChoiceCallback(int num) override {
*valueStr_ = choices_[num]; *valueStr_ = choices_[num];
} }

View File

@ -24,27 +24,23 @@ struct NeighborResult {
class ViewGroup : public View { class ViewGroup : public View {
public: public:
ViewGroup(LayoutParams *layoutParams = 0) : View(layoutParams) {} ViewGroup(LayoutParams *layoutParams = 0) : View(layoutParams) {}
virtual ~ViewGroup(); ~ViewGroup();
// Pass through external events to children. // Pass through external events to children.
virtual bool Key(const KeyInput &input) override; bool Key(const KeyInput &input) override;
virtual bool Touch(const TouchInput &input) override; bool Touch(const TouchInput &input) override;
virtual void Axis(const AxisInput &input) override; void Axis(const AxisInput &input) override;
// By default, a container will layout to its own bounds. // By default, a container will layout to its own bounds.
virtual void Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) override = 0; void Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) override = 0;
virtual void Layout() override = 0; void Layout() override = 0;
virtual void Update() override; void Update() override;
virtual void Query(float x, float y, std::vector<View *> &list) override; void Query(float x, float y, std::vector<View *> &list) override;
virtual void DeviceLost() override; void DeviceLost() override;
virtual void DeviceRestored(Draw::DrawContext *draw) override; void DeviceRestored(Draw::DrawContext *draw) override;
virtual void Draw(UIContext &dc) override; void Draw(UIContext &dc) override;
// These should be unused.
virtual float GetContentWidth() const { return 0.0f; }
virtual float GetContentHeight() const { return 0.0f; }
// Takes ownership! DO NOT add a view to multiple parents! // Takes ownership! DO NOT add a view to multiple parents!
template <class T> template <class T>
@ -54,8 +50,8 @@ public:
return view; return view;
} }
virtual bool SetFocus() override; bool SetFocus() override;
virtual bool SubviewFocused(View *view) override; bool SubviewFocused(View *view) override;
virtual void RemoveSubview(View *view); virtual void RemoveSubview(View *view);
void SetDefaultFocusView(View *view) { defaultFocusView_ = view; } void SetDefaultFocusView(View *view) { defaultFocusView_ = view; }
@ -406,9 +402,9 @@ public:
class ChoiceListAdaptor : public ListAdaptor { class ChoiceListAdaptor : public ListAdaptor {
public: public:
ChoiceListAdaptor(const char *items[], int numItems) : items_(items), numItems_(numItems) {} ChoiceListAdaptor(const char *items[], int numItems) : items_(items), numItems_(numItems) {}
virtual View *CreateItemView(int index); View *CreateItemView(int index) override;
virtual int GetNumItems() { return numItems_; } int GetNumItems() override { return numItems_; }
virtual bool AddEventCallback(View *view, std::function<EventReturn(EventParams&)> callback); bool AddEventCallback(View *view, std::function<EventReturn(EventParams&)> callback) override;
private: private:
const char **items_; const char **items_;
@ -421,12 +417,12 @@ class StringVectorListAdaptor : public ListAdaptor {
public: public:
StringVectorListAdaptor() : selected_(-1) {} StringVectorListAdaptor() : selected_(-1) {}
StringVectorListAdaptor(const std::vector<std::string> &items, int selected = -1) : items_(items), selected_(selected) {} StringVectorListAdaptor(const std::vector<std::string> &items, int selected = -1) : items_(items), selected_(selected) {}
virtual View *CreateItemView(int index) override; View *CreateItemView(int index) override;
virtual int GetNumItems() override { return (int)items_.size(); } int GetNumItems() override { return (int)items_.size(); }
virtual bool AddEventCallback(View *view, std::function<EventReturn(EventParams&)> callback) override; bool AddEventCallback(View *view, std::function<EventReturn(EventParams&)> callback) override;
void SetSelected(int sel) override { selected_ = sel; } void SetSelected(int sel) override { selected_ = sel; }
virtual std::string GetTitle(int index) const override { return items_[index]; } std::string GetTitle(int index) const override { return items_[index]; }
virtual int GetSelected() override { return selected_; } int GetSelected() override { return selected_; }
private: private:
std::vector<std::string> items_; std::vector<std::string> items_;
@ -440,7 +436,7 @@ public:
ListView(ListAdaptor *a, std::set<int> hidden = std::set<int>(), LayoutParams *layoutParams = 0); ListView(ListAdaptor *a, std::set<int> hidden = std::set<int>(), LayoutParams *layoutParams = 0);
int GetSelected() { return adaptor_->GetSelected(); } int GetSelected() { return adaptor_->GetSelected(); }
virtual void Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) override; void Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) override;
virtual void SetMaxHeight(float mh) { maxHeight_ = mh; } virtual void SetMaxHeight(float mh) { maxHeight_ = mh; }
Event OnChoice; Event OnChoice;
std::string DescribeLog() const override { return "ListView: " + View::DescribeLog(); } std::string DescribeLog() const override { return "ListView: " + View::DescribeLog(); }

View File

@ -31,6 +31,8 @@ enum {
class DebugInterface class DebugInterface
{ {
public: public:
virtual ~DebugInterface() {}
virtual const char *disasm(unsigned int address, unsigned int align) {return "NODEBUGGER";} virtual const char *disasm(unsigned int address, unsigned int align) {return "NODEBUGGER";}
virtual int getInstructionSize(int instruction) {return 1;} virtual int getInstructionSize(int instruction) {return 1;}

View File

@ -99,8 +99,7 @@ private:
class DisassemblyOpcode: public DisassemblyEntry class DisassemblyOpcode: public DisassemblyEntry
{ {
public: public:
DisassemblyOpcode(u32 _address, int _num): address(_address), num(_num) { }; DisassemblyOpcode(u32 _address, int _num): address(_address), num(_num) { }
virtual ~DisassemblyOpcode() { };
void recheck() override { }; void recheck() override { };
int getNumLines() override { return num; }; int getNumLines() override { return num; };
int getLineNum(u32 address, bool findStart) override { return (address - this->address) / 4; }; int getLineNum(u32 address, bool findStart) override { return (address - this->address) / 4; };
@ -118,8 +117,7 @@ private:
class DisassemblyMacro: public DisassemblyEntry class DisassemblyMacro: public DisassemblyEntry
{ {
public: public:
DisassemblyMacro(u32 _address): address(_address) { }; DisassemblyMacro(u32 _address): address(_address) { }
virtual ~DisassemblyMacro() { };
void setMacroLi(u32 _immediate, u8 _rt); void setMacroLi(u32 _immediate, u8 _rt);
void setMacroMemory(std::string _name, u32 _immediate, u8 _rt, int _dataSize); void setMacroMemory(std::string _name, u32 _immediate, u8 _rt, int _dataSize);
@ -147,7 +145,6 @@ class DisassemblyData: public DisassemblyEntry
{ {
public: public:
DisassemblyData(u32 _address, u32 _size, DataType _type); DisassemblyData(u32 _address, u32 _size, DataType _type);
virtual ~DisassemblyData() { };
void recheck() override; void recheck() override;
int getNumLines() override { return (int)lines.size(); }; int getNumLines() override { return (int)lines.size(); };
@ -179,7 +176,6 @@ class DisassemblyComment: public DisassemblyEntry
{ {
public: public:
DisassemblyComment(u32 _address, u32 _size, std::string name, std::string param); DisassemblyComment(u32 _address, u32 _size, std::string name, std::string param);
virtual ~DisassemblyComment() { };
void recheck() override { }; void recheck() override { };
int getNumLines() override { return 1; }; int getNumLines() override { return 1; };

View File

@ -36,7 +36,7 @@ public:
WebSocketDisasmState() { WebSocketDisasmState() {
disasm_.setCpu(currentDebugMIPS); disasm_.setCpu(currentDebugMIPS);
} }
~WebSocketDisasmState() override { ~WebSocketDisasmState() {
disasm_.clear(); disasm_.clear();
} }

View File

@ -23,7 +23,7 @@
#include "GPU/Debugger/Record.h" #include "GPU/Debugger/Record.h"
struct WebSocketGPURecordState : public DebuggerSubscriber { struct WebSocketGPURecordState : public DebuggerSubscriber {
~WebSocketGPURecordState() override; ~WebSocketGPURecordState();
void Dump(DebuggerRequest &req); void Dump(DebuggerRequest &req);
void Broadcast(net::WebSocketServer *ws) override; void Broadcast(net::WebSocketServer *ws) override;

View File

@ -68,7 +68,7 @@ struct DebuggerGPUStatsEvent {
struct WebSocketGPUStatsState : public DebuggerSubscriber { struct WebSocketGPUStatsState : public DebuggerSubscriber {
WebSocketGPUStatsState(); WebSocketGPUStatsState();
~WebSocketGPUStatsState() override; ~WebSocketGPUStatsState();
void Get(DebuggerRequest &req); void Get(DebuggerRequest &req);
void Feed(DebuggerRequest &req); void Feed(DebuggerRequest &req);

View File

@ -27,7 +27,7 @@ class WebSocketMemoryInfoState : public DebuggerSubscriber {
public: public:
WebSocketMemoryInfoState() { WebSocketMemoryInfoState() {
} }
~WebSocketMemoryInfoState() override { ~WebSocketMemoryInfoState() {
UpdateOverride(false); UpdateOverride(false);
} }

View File

@ -32,7 +32,7 @@ struct WebSocketSteppingState : public DebuggerSubscriber {
WebSocketSteppingState() { WebSocketSteppingState() {
disasm_.setCpu(currentDebugMIPS); disasm_.setCpu(currentDebugMIPS);
} }
~WebSocketSteppingState() override { ~WebSocketSteppingState() {
disasm_.clear(); disasm_.clear();
} }

View File

@ -36,12 +36,12 @@ struct SceUtilityGamedataInstallParam {
class PSPGamedataInstallDialog: public PSPDialog { class PSPGamedataInstallDialog: public PSPDialog {
public: public:
PSPGamedataInstallDialog(UtilityDialogType type); PSPGamedataInstallDialog(UtilityDialogType type);
virtual ~PSPGamedataInstallDialog(); ~PSPGamedataInstallDialog();
virtual int Init(u32 paramAddr); int Init(u32 paramAddr);
virtual int Update(int animSpeed) override; int Update(int animSpeed) override;
virtual int Shutdown(bool force = false) override; int Shutdown(bool force = false) override;
virtual void DoState(PointerWrap &p) override; void DoState(PointerWrap &p) override;
int Abort(); int Abort();
std::string GetGameDataInstallFileName(SceUtilityGamedataInstallParam *param, std::string filename); std::string GetGameDataInstallFileName(SceUtilityGamedataInstallParam *param, std::string filename);

View File

@ -59,18 +59,18 @@ struct pspMessageDialog
class PSPMsgDialog: public PSPDialog { class PSPMsgDialog: public PSPDialog {
public: public:
PSPMsgDialog(UtilityDialogType type); PSPMsgDialog(UtilityDialogType type);
virtual ~PSPMsgDialog(); ~PSPMsgDialog();
virtual int Init(unsigned int paramAddr); int Init(unsigned int paramAddr);
virtual int Update(int animSpeed) override; int Update(int animSpeed) override;
virtual int Shutdown(bool force = false) override; int Shutdown(bool force = false) override;
virtual void DoState(PointerWrap &p) override; void DoState(PointerWrap &p) override;
virtual pspUtilityDialogCommon *GetCommonParam() override; pspUtilityDialogCommon *GetCommonParam() override;
int Abort(); int Abort();
protected: protected:
virtual bool UseAutoStatus() override { bool UseAutoStatus() override {
return false; return false;
} }

View File

@ -38,13 +38,13 @@ struct SceUtilityNetconfParam {
class PSPNetconfDialog: public PSPDialog { class PSPNetconfDialog: public PSPDialog {
public: public:
PSPNetconfDialog(UtilityDialogType type); PSPNetconfDialog(UtilityDialogType type);
virtual ~PSPNetconfDialog(); ~PSPNetconfDialog();
virtual int Init(u32 paramAddr); int Init(u32 paramAddr);
virtual int Update(int animSpeed) override; int Update(int animSpeed) override;
virtual int Shutdown(bool force = false) override; int Shutdown(bool force = false) override;
virtual void DoState(PointerWrap &p) override; void DoState(PointerWrap &p) override;
virtual pspUtilityDialogCommon* GetCommonParam() override; pspUtilityDialogCommon* GetCommonParam() override;
protected: protected:
bool UseAutoStatus() override { bool UseAutoStatus() override {

View File

@ -34,13 +34,13 @@ struct SceUtilityNpSigninParam {
class PSPNpSigninDialog: public PSPDialog { class PSPNpSigninDialog: public PSPDialog {
public: public:
PSPNpSigninDialog(UtilityDialogType type); PSPNpSigninDialog(UtilityDialogType type);
virtual ~PSPNpSigninDialog(); ~PSPNpSigninDialog();
virtual int Init(u32 paramAddr); int Init(u32 paramAddr);
virtual int Update(int animSpeed) override; int Update(int animSpeed) override;
virtual int Shutdown(bool force = false) override; int Shutdown(bool force = false) override;
virtual void DoState(PointerWrap &p) override; void DoState(PointerWrap &p) override;
virtual pspUtilityDialogCommon* GetCommonParam() override; pspUtilityDialogCommon* GetCommonParam() override;
protected: protected:
bool UseAutoStatus() override { bool UseAutoStatus() override {

View File

@ -213,16 +213,16 @@ enum class PSPOskNativeStatus {
class PSPOskDialog: public PSPDialog { class PSPOskDialog: public PSPDialog {
public: public:
PSPOskDialog(UtilityDialogType type); PSPOskDialog(UtilityDialogType type);
virtual ~PSPOskDialog(); ~PSPOskDialog();
virtual int Init(u32 oskPtr); int Init(u32 oskPtr);
virtual int Update(int animSpeed) override; int Update(int animSpeed) override;
virtual int Shutdown(bool force = false) override; int Shutdown(bool force = false) override;
virtual void DoState(PointerWrap &p) override; void DoState(PointerWrap &p) override;
virtual pspUtilityDialogCommon *GetCommonParam() override; pspUtilityDialogCommon *GetCommonParam() override;
protected: protected:
virtual bool UseAutoStatus() override { bool UseAutoStatus() override {
return false; return false;
} }

View File

@ -22,9 +22,9 @@
class PSPPlaceholderDialog: public PSPDialog { class PSPPlaceholderDialog: public PSPDialog {
public: public:
PSPPlaceholderDialog(UtilityDialogType type); PSPPlaceholderDialog(UtilityDialogType type);
virtual ~PSPPlaceholderDialog(); ~PSPPlaceholderDialog();
virtual int Init(); int Init();
virtual int Update(int animSpeed) override; int Update(int animSpeed) override;
}; };

View File

@ -72,18 +72,18 @@
class PSPSaveDialog: public PSPDialog { class PSPSaveDialog: public PSPDialog {
public: public:
PSPSaveDialog(UtilityDialogType type); PSPSaveDialog(UtilityDialogType type);
virtual ~PSPSaveDialog(); ~PSPSaveDialog();
virtual int Init(int paramAddr); int Init(int paramAddr);
virtual int Update(int animSpeed) override; int Update(int animSpeed) override;
virtual int Shutdown(bool force = false) override; int Shutdown(bool force = false) override;
virtual void DoState(PointerWrap &p) override; void DoState(PointerWrap &p) override;
virtual pspUtilityDialogCommon *GetCommonParam() override; pspUtilityDialogCommon *GetCommonParam() override;
void ExecuteIOAction(); void ExecuteIOAction();
protected: protected:
virtual bool UseAutoStatus() override { bool UseAutoStatus() override {
return false; return false;
} }

View File

@ -25,13 +25,13 @@ struct SceUtilityScreenshotParams;
class PSPScreenshotDialog : public PSPDialog { class PSPScreenshotDialog : public PSPDialog {
public: public:
PSPScreenshotDialog(UtilityDialogType type); PSPScreenshotDialog(UtilityDialogType type);
virtual ~PSPScreenshotDialog(); ~PSPScreenshotDialog();
virtual int Init(u32 paramAddr); int Init(u32 paramAddr);
virtual int Update(int animSpeed) override; int Update(int animSpeed) override;
virtual int ContStart(); int ContStart();
virtual void DoState(PointerWrap &p) override; void DoState(PointerWrap &p) override;
virtual pspUtilityDialogCommon *GetCommonParam() override; pspUtilityDialogCommon *GetCommonParam() override;
protected: protected:
// TODO: Manage status correctly. // TODO: Manage status correctly.

View File

@ -27,7 +27,7 @@
class CachingFileLoader : public ProxiedFileLoader { class CachingFileLoader : public ProxiedFileLoader {
public: public:
CachingFileLoader(FileLoader *backend); CachingFileLoader(FileLoader *backend);
~CachingFileLoader() override; ~CachingFileLoader();
bool Exists() override; bool Exists() override;
bool ExistsFast() override; bool ExistsFast() override;

View File

@ -31,7 +31,7 @@ class DiskCachingFileLoaderCache;
class DiskCachingFileLoader : public ProxiedFileLoader { class DiskCachingFileLoader : public ProxiedFileLoader {
public: public:
DiskCachingFileLoader(FileLoader *backend); DiskCachingFileLoader(FileLoader *backend);
~DiskCachingFileLoader() override; ~DiskCachingFileLoader();
bool Exists() override; bool Exists() override;
bool ExistsFast() override; bool ExistsFast() override;

View File

@ -30,21 +30,21 @@
class HTTPFileLoader : public FileLoader { class HTTPFileLoader : public FileLoader {
public: public:
HTTPFileLoader(const ::Path &filename); HTTPFileLoader(const ::Path &filename);
virtual ~HTTPFileLoader() override; ~HTTPFileLoader();
bool IsRemote() override { bool IsRemote() override {
return true; return true;
} }
virtual bool Exists() override; bool Exists() override;
virtual bool ExistsFast() override; bool ExistsFast() override;
virtual bool IsDirectory() override; bool IsDirectory() override;
virtual s64 FileSize() override; s64 FileSize() override;
virtual Path GetPath() const override; Path GetPath() const override;
virtual size_t ReadAt(s64 absolutePos, size_t bytes, size_t count, void *data, Flags flags = Flags::NONE) override { size_t ReadAt(s64 absolutePos, size_t bytes, size_t count, void *data, Flags flags = Flags::NONE) override {
return ReadAt(absolutePos, bytes * count, data, flags) / bytes; return ReadAt(absolutePos, bytes * count, data, flags) / bytes;
} }
virtual size_t ReadAt(s64 absolutePos, size_t bytes, void *data, Flags flags = Flags::NONE) override; size_t ReadAt(s64 absolutePos, size_t bytes, void *data, Flags flags = Flags::NONE) override;
void Cancel() override { void Cancel() override {
cancel_ = true; cancel_ = true;

View File

@ -30,15 +30,15 @@ typedef void *HANDLE;
class LocalFileLoader : public FileLoader { class LocalFileLoader : public FileLoader {
public: public:
LocalFileLoader(const Path &filename); LocalFileLoader(const Path &filename);
virtual ~LocalFileLoader(); ~LocalFileLoader();
virtual bool Exists() override; bool Exists() override;
virtual bool IsDirectory() override; bool IsDirectory() override;
virtual s64 FileSize() override; s64 FileSize() override;
virtual Path GetPath() const override { Path GetPath() const override {
return filename_; return filename_;
} }
virtual size_t ReadAt(s64 absolutePos, size_t bytes, size_t count, void *data, Flags flags = Flags::NONE) override; size_t ReadAt(s64 absolutePos, size_t bytes, size_t count, void *data, Flags flags = Flags::NONE) override;
private: private:
#ifndef _WIN32 #ifndef _WIN32

View File

@ -27,7 +27,7 @@
class RamCachingFileLoader : public ProxiedFileLoader { class RamCachingFileLoader : public ProxiedFileLoader {
public: public:
RamCachingFileLoader(FileLoader *backend); RamCachingFileLoader(FileLoader *backend);
~RamCachingFileLoader() override; ~RamCachingFileLoader();
bool Exists() override; bool Exists() override;
bool ExistsFast() override; bool ExistsFast() override;

View File

@ -77,7 +77,7 @@ public:
class SequentialHandleAllocator : public IHandleAllocator { class SequentialHandleAllocator : public IHandleAllocator {
public: public:
SequentialHandleAllocator() : handle_(1) {} SequentialHandleAllocator() : handle_(1) {}
virtual u32 GetNewHandle() override { u32 GetNewHandle() override {
u32 res = handle_++; u32 res = handle_++;
if (handle_ < 0) { if (handle_ < 0) {
// Some code assumes it'll never become 0. // Some code assumes it'll never become 0.
@ -85,7 +85,7 @@ public:
} }
return res; return res;
} }
virtual void FreeHandle(u32 handle) override {} void FreeHandle(u32 handle) override {}
private: private:
int handle_; int handle_;
}; };
@ -142,7 +142,7 @@ public:
class EmptyFileSystem : public IFileSystem { class EmptyFileSystem : public IFileSystem {
public: public:
virtual void DoState(PointerWrap &p) override {} void DoState(PointerWrap &p) override {}
std::vector<PSPFileInfo> GetDirListing(const std::string &path, bool *exists = nullptr) override { std::vector<PSPFileInfo> GetDirListing(const std::string &path, bool *exists = nullptr) override {
if (exists) if (exists)
*exists = false; *exists = false;
@ -158,14 +158,14 @@ public:
size_t SeekFile(u32 handle, s32 position, FileMove type) override {return 0;} size_t SeekFile(u32 handle, s32 position, FileMove type) override {return 0;}
PSPFileInfo GetFileInfo(std::string filename) override {PSPFileInfo f; return f;} PSPFileInfo GetFileInfo(std::string filename) override {PSPFileInfo f; return f;}
bool OwnsHandle(u32 handle) override {return false;} bool OwnsHandle(u32 handle) override {return false;}
virtual bool MkDir(const std::string &dirname) override {return false;} bool MkDir(const std::string &dirname) override {return false;}
virtual bool RmDir(const std::string &dirname) override {return false;} bool RmDir(const std::string &dirname) override {return false;}
virtual int RenameFile(const std::string &from, const std::string &to) override {return -1;} int RenameFile(const std::string &from, const std::string &to) override {return -1;}
virtual bool RemoveFile(const std::string &filename) override {return false;} bool RemoveFile(const std::string &filename) override {return false;}
virtual int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override {return SCE_KERNEL_ERROR_ERRNO_FUNCTION_NOT_SUPPORTED; } int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override { return SCE_KERNEL_ERROR_ERRNO_FUNCTION_NOT_SUPPORTED; }
virtual PSPDevType DevType(u32 handle) override { return PSPDevType::INVALID; } PSPDevType DevType(u32 handle) override { return PSPDevType::INVALID; }
virtual FileSystemFlags Flags() override { return FileSystemFlags::NONE; } FileSystemFlags Flags() override { return FileSystemFlags::NONE; }
virtual u64 FreeSpace(const std::string &path) override { return 0; } u64 FreeSpace(const std::string &path) override { return 0; }
bool ComputeRecursiveDirSizeIfFast(const std::string &path, int64_t *size) override { return false; } bool ComputeRecursiveDirSizeIfFast(const std::string &path, int64_t *size) override { return false; }
}; };

View File

@ -94,7 +94,7 @@ public:
class ProxiedFileLoader : public FileLoader { class ProxiedFileLoader : public FileLoader {
public: public:
ProxiedFileLoader(FileLoader *backend) : backend_(backend) {} ProxiedFileLoader(FileLoader *backend) : backend_(backend) {}
~ProxiedFileLoader() override { ~ProxiedFileLoader() {
// Takes ownership. // Takes ownership.
delete backend_; delete backend_;
} }

View File

@ -136,7 +136,7 @@ private:
class IRJit : public JitInterface { class IRJit : public JitInterface {
public: public:
IRJit(MIPSState *mipsState); IRJit(MIPSState *mipsState);
virtual ~IRJit(); ~IRJit();
void DoState(PointerWrap &p) override; void DoState(PointerWrap &p) override;

View File

@ -14,7 +14,7 @@ public:
class IRToX86 : public IRToNativeInterface { class IRToX86 : public IRToNativeInterface {
public: public:
void SetCodeBlock(Gen::XCodeBlock *code) { code_ = code; } void SetCodeBlock(Gen::XCodeBlock *code) { code_ = code; }
virtual void ConvertIRToNative(const IRInst *instructions, int count, const u32 *constants) override; void ConvertIRToNative(const IRInst *instructions, int count, const u32 *constants) override;
private: private:
Gen::XCodeBlock *code_; Gen::XCodeBlock *code_;

View File

@ -44,7 +44,7 @@ struct RegCacheState {
class Jit : public Gen::XCodeBlock, public JitInterface, public MIPSFrontendInterface { class Jit : public Gen::XCodeBlock, public JitInterface, public MIPSFrontendInterface {
public: public:
Jit(MIPSState *mipsState); Jit(MIPSState *mipsState);
virtual ~Jit(); ~Jit();
const JitOptions &GetJitOptions() { return jo; } const JitOptions &GetJitOptions() { return jo; }

View File

@ -41,7 +41,7 @@ public:
JPEGFileStream(const Path &filename) { JPEGFileStream(const Path &filename) {
fp_ = File::OpenCFile(filename, "wb"); fp_ = File::OpenCFile(filename, "wb");
} }
~JPEGFileStream() override { ~JPEGFileStream() {
if (fp_ ) { if (fp_ ) {
fclose(fp_); fclose(fp_);
} }

View File

@ -28,6 +28,8 @@ template <typename B, typename Event, typename EventType, EventType EVENT_INVALI
struct ThreadEventQueue : public B { struct ThreadEventQueue : public B {
ThreadEventQueue() : threadEnabled_(false), eventsRunning_(false), eventsHaveRun_(false) { ThreadEventQueue() : threadEnabled_(false), eventsRunning_(false), eventsHaveRun_(false) {
} }
virtual ~ThreadEventQueue() {
}
void SetThreadEnabled(bool threadEnabled) { void SetThreadEnabled(bool threadEnabled) {
threadEnabled_ = threadEnabled; threadEnabled_ = threadEnabled;

View File

@ -190,6 +190,7 @@ struct GPUDebugVertex {
class GPUDebugInterface { class GPUDebugInterface {
public: public:
virtual ~GPUDebugInterface() {}
virtual bool GetCurrentDisplayList(DisplayList &list) = 0; virtual bool GetCurrentDisplayList(DisplayList &list) = 0;
virtual std::vector<DisplayList> ActiveDisplayLists() = 0; virtual std::vector<DisplayList> ActiveDisplayLists() = 0;
virtual void ResetListPC(int listID, u32 pc) = 0; virtual void ResetListPC(int listID, u32 pc) = 0;

View File

@ -63,7 +63,7 @@ struct SurfaceInfo {
GEPatchPrimType primType; GEPatchPrimType primType;
bool patchFacing; bool patchFacing;
void Init() { void BaseInit() {
// If specified as 0, uses 1. // If specified as 0, uses 1.
if (tess_u < 1) tess_u = 1; if (tess_u < 1) tess_u = 1;
if (tess_v < 1) tess_v = 1; if (tess_v < 1) tess_v = 1;
@ -88,7 +88,7 @@ struct BezierSurface : public SurfaceInfo {
int num_verts_per_patch; int num_verts_per_patch;
void Init(int maxVertices) { void Init(int maxVertices) {
SurfaceInfo::Init(); SurfaceInfo::BaseInit();
// Downsample until it fits, in case crazy tessellation factors are sent. // Downsample until it fits, in case crazy tessellation factors are sent.
while ((tess_u + 1) * (tess_v + 1) * num_patches_u * num_patches_v > maxVertices) { while ((tess_u + 1) * (tess_v + 1) * num_patches_u * num_patches_v > maxVertices) {
tess_u--; tess_u--;
@ -126,7 +126,7 @@ struct SplineSurface : public SurfaceInfo {
int num_vertices_u; int num_vertices_u;
void Init(int maxVertices) { void Init(int maxVertices) {
SurfaceInfo::Init(); SurfaceInfo::BaseInit();
// Downsample until it fits, in case crazy tessellation factors are sent. // Downsample until it fits, in case crazy tessellation factors are sent.
while ((num_patches_u * tess_u + 1) * (num_patches_v * tess_v + 1) > maxVertices) { while ((num_patches_u * tess_u + 1) * (num_patches_v * tess_v + 1) > maxVertices) {
tess_u--; tess_u--;

View File

@ -117,7 +117,7 @@ public:
class DrawEngineD3D11 : public DrawEngineCommon { class DrawEngineD3D11 : public DrawEngineCommon {
public: public:
DrawEngineD3D11(Draw::DrawContext *draw, ID3D11Device *device, ID3D11DeviceContext *context); DrawEngineD3D11(Draw::DrawContext *draw, ID3D11Device *device, ID3D11DeviceContext *context);
virtual ~DrawEngineD3D11(); ~DrawEngineD3D11();
void SetShaderManager(ShaderManagerD3D11 *shaderManager) { void SetShaderManager(ShaderManagerD3D11 *shaderManager) {
shaderManager_ = shaderManager; shaderManager_ = shaderManager;

View File

@ -54,9 +54,6 @@ protected:
void FinishDeferred() override; void FinishDeferred() override;
private: private:
void Flush() {
drawEngine_.Flush();
}
// void ApplyDrawState(int prim); // void ApplyDrawState(int prim);
void CheckFlushOp(int cmd, u32 diff); void CheckFlushOp(int cmd, u32 diff);
void BuildReportingInfo() override; void BuildReportingInfo() override;

View File

@ -105,7 +105,7 @@ public:
class DrawEngineDX9 : public DrawEngineCommon { class DrawEngineDX9 : public DrawEngineCommon {
public: public:
DrawEngineDX9(Draw::DrawContext *draw); DrawEngineDX9(Draw::DrawContext *draw);
virtual ~DrawEngineDX9(); ~DrawEngineDX9();
void SetShaderManager(ShaderManagerDX9 *shaderManager) { void SetShaderManager(ShaderManagerDX9 *shaderManager) {
shaderManager_ = shaderManager; shaderManager_ = shaderManager;

View File

@ -54,9 +54,6 @@ protected:
void FinishDeferred() override; void FinishDeferred() override;
private: private:
void Flush() {
drawEngine_.Flush();
}
void CheckFlushOp(int cmd, u32 diff); void CheckFlushOp(int cmd, u32 diff);
void BuildReportingInfo() override; void BuildReportingInfo() override;

View File

@ -487,10 +487,6 @@ void DrawEngineGLES::DoFlush() {
GPUDebug::NotifyDraw(); GPUDebug::NotifyDraw();
} }
bool DrawEngineGLES::IsCodePtrVertexDecoder(const u8 *ptr) const {
return decJitCache_->IsInSpace(ptr);
}
// TODO: Refactor this to a single USE flag. // TODO: Refactor this to a single USE flag.
bool DrawEngineGLES::SupportsHWTessellation() const { bool DrawEngineGLES::SupportsHWTessellation() const {
bool hasTexelFetch = gl_extensions.GLES3 || (!gl_extensions.IsGLES && gl_extensions.VersionGEThan(3, 3, 0)) || gl_extensions.EXT_gpu_shader4; bool hasTexelFetch = gl_extensions.GLES3 || (!gl_extensions.IsGLES && gl_extensions.VersionGEThan(3, 3, 0)) || gl_extensions.EXT_gpu_shader4;

View File

@ -61,7 +61,7 @@ public:
class DrawEngineGLES : public DrawEngineCommon { class DrawEngineGLES : public DrawEngineCommon {
public: public:
DrawEngineGLES(Draw::DrawContext *draw); DrawEngineGLES(Draw::DrawContext *draw);
virtual ~DrawEngineGLES(); ~DrawEngineGLES();
void SetShaderManager(ShaderManagerGLES *shaderManager) { void SetShaderManager(ShaderManagerGLES *shaderManager) {
shaderManager_ = shaderManager; shaderManager_ = shaderManager;
@ -97,8 +97,6 @@ public:
DoFlush(); DoFlush();
} }
bool IsCodePtrVertexDecoder(const u8 *ptr) const;
void DispatchFlush() override { Flush(); } void DispatchFlush() override { Flush(); }
GLPushBuffer *GetPushVertexBuffer() { GLPushBuffer *GetPushVertexBuffer() {

View File

@ -65,9 +65,6 @@ protected:
void FinishDeferred() override; void FinishDeferred() override;
private: private:
void Flush() {
drawEngine_.Flush();
}
void CheckFlushOp(int cmd, u32 diff); void CheckFlushOp(int cmd, u32 diff);
void BuildReportingInfo() override; void BuildReportingInfo() override;

View File

@ -71,7 +71,7 @@ struct TransformedVertex {
class GPUCommon : public GPUInterface, public GPUDebugInterface { class GPUCommon : public GPUInterface, public GPUDebugInterface {
public: public:
GPUCommon(GraphicsContext *gfxCtx, Draw::DrawContext *draw); GPUCommon(GraphicsContext *gfxCtx, Draw::DrawContext *draw);
virtual ~GPUCommon(); ~GPUCommon();
Draw::DrawContext *GetDrawContext() override { Draw::DrawContext *GetDrawContext() override {
return draw_; return draw_;

View File

@ -140,7 +140,7 @@ enum {
class DrawEngineVulkan : public DrawEngineCommon { class DrawEngineVulkan : public DrawEngineCommon {
public: public:
DrawEngineVulkan(Draw::DrawContext *draw); DrawEngineVulkan(Draw::DrawContext *draw);
virtual ~DrawEngineVulkan(); ~DrawEngineVulkan();
// We reference feature flags, so this is called after construction. // We reference feature flags, so this is called after construction.
void InitDeviceObjects(); void InitDeviceObjects();

View File

@ -71,9 +71,6 @@ protected:
void CheckRenderResized() override; void CheckRenderResized() override;
private: private:
void Flush() {
drawEngine_.Flush();
}
void CheckFlushOp(int cmd, u32 diff); void CheckFlushOp(int cmd, u32 diff);
void BuildReportingInfo() override; void BuildReportingInfo() override;
void InitClear() override; void InitClear() override;

View File

@ -588,7 +588,7 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
} else { } else {
data = drawEngine_->GetPushBufferForTextureData()->PushAligned(sz, &bufferOffset, &texBuf, pushAlignment); data = drawEngine_->GetPushBufferForTextureData()->PushAligned(sz, &bufferOffset, &texBuf, pushAlignment);
} }
LoadTextureLevel(*entry, (uint8_t *)data, lstride, srcLevel, lfactor, actualFmt); LoadVulkanTextureLevel(*entry, (uint8_t *)data, lstride, srcLevel, lfactor, actualFmt);
if (plan.saveTexture) if (plan.saveTexture)
bufferOffset = drawEngine_->GetPushBufferForTextureData()->PushAligned(&saveData[0], sz, pushAlignment, &texBuf); bufferOffset = drawEngine_->GetPushBufferForTextureData()->PushAligned(&saveData[0], sz, pushAlignment, &texBuf);
}; };
@ -706,7 +706,7 @@ VkFormat TextureCacheVulkan::GetDestFormat(GETextureFormat format, GEPaletteForm
} }
} }
void TextureCacheVulkan::LoadTextureLevel(TexCacheEntry &entry, uint8_t *writePtr, int rowPitch, int level, int scaleFactor, VkFormat dstFmt) { void TextureCacheVulkan::LoadVulkanTextureLevel(TexCacheEntry &entry, uint8_t *writePtr, int rowPitch, int level, int scaleFactor, VkFormat dstFmt) {
int w = gstate.getTextureWidth(level); int w = gstate.getTextureWidth(level);
int h = gstate.getTextureHeight(level); int h = gstate.getTextureHeight(level);

View File

@ -100,7 +100,7 @@ protected:
void *GetNativeTextureView(const TexCacheEntry *entry) override; void *GetNativeTextureView(const TexCacheEntry *entry) override;
private: private:
void LoadTextureLevel(TexCacheEntry &entry, uint8_t *writePtr, int rowPitch, int level, int scaleFactor, VkFormat dstFmt); void LoadVulkanTextureLevel(TexCacheEntry &entry, uint8_t *writePtr, int rowPitch, int level, int scaleFactor, VkFormat dstFmt);
VkFormat GetDestFormat(GETextureFormat format, GEPaletteFormat clutFormat) const; VkFormat GetDestFormat(GETextureFormat format, GEPaletteFormat clutFormat) const;
void UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutBase, bool clutIndexIsSimple) override; void UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutBase, bool clutIndexIsSimple) override;

View File

@ -30,45 +30,45 @@ public:
mainWindow = mainWindow_; mainWindow = mainWindow_;
} }
virtual void UpdateUI() override { void UpdateUI() override {
mainWindow->updateMenus(); mainWindow->updateMenus();
} }
virtual void UpdateMemView() override { void UpdateMemView() override {
} }
virtual void UpdateDisassembly() override { void UpdateDisassembly() override {
mainWindow->updateMenus(); mainWindow->updateMenus();
} }
virtual void SetDebugMode(bool mode) override { void SetDebugMode(bool mode) override {
} }
virtual bool InitGraphics(std::string *error_message, GraphicsContext **ctx) override { return true; } bool InitGraphics(std::string *error_message, GraphicsContext **ctx) override { return true; }
virtual void ShutdownGraphics() override {} void ShutdownGraphics() override {}
virtual void InitSound() override; void InitSound() override;
virtual void UpdateSound() override {} void UpdateSound() override {}
virtual void ShutdownSound() override; void ShutdownSound() override;
// this is sent from EMU thread! Make sure that Host handles it properly! // this is sent from EMU thread! Make sure that Host handles it properly!
virtual void BootDone() override { void BootDone() override {
g_symbolMap->SortSymbols(); g_symbolMap->SortSymbols();
mainWindow->Notify(MainWindowMsg::BOOT_DONE); mainWindow->Notify(MainWindowMsg::BOOT_DONE);
} }
virtual bool IsDebuggingEnabled() override { bool IsDebuggingEnabled() override {
#ifdef _DEBUG #ifdef _DEBUG
return true; return true;
#else #else
return false; return false;
#endif #endif
} }
virtual bool AttemptLoadSymbolMap() override { bool AttemptLoadSymbolMap() override {
auto fn = SymbolMapFilename(PSP_CoreParameter().fileToStart); auto fn = SymbolMapFilename(PSP_CoreParameter().fileToStart);
return g_symbolMap->LoadSymbolMap(fn); return g_symbolMap->LoadSymbolMap(fn);
} }
virtual void NotifySymbolMapUpdated() override { g_symbolMap->SortSymbols(); } void NotifySymbolMapUpdated() override { g_symbolMap->SortSymbols(); }
void PrepareShutdown() { void PrepareShutdown() {
auto fn = SymbolMapFilename(PSP_CoreParameter().fileToStart); auto fn = SymbolMapFilename(PSP_CoreParameter().fileToStart);

View File

@ -61,7 +61,7 @@ class DisplayLayoutBackground : public UI::View {
public: public:
DisplayLayoutBackground(UI::ChoiceStrip *mode, UI::LayoutParams *layoutParams) : UI::View(layoutParams), mode_(mode) {} DisplayLayoutBackground(UI::ChoiceStrip *mode, UI::LayoutParams *layoutParams) : UI::View(layoutParams), mode_(mode) {}
bool Touch(const TouchInput &touch) { bool Touch(const TouchInput &touch) override {
int mode = mode_ ? mode_->GetSelection() : 0; int mode = mode_ ? mode_->GetSelection() : 0;
if ((touch.flags & TOUCH_MOVE) != 0 && dragging_) { if ((touch.flags & TOUCH_MOVE) != 0 && dragging_) {

View File

@ -334,7 +334,7 @@ public:
: gamePath_(gamePath), info_(info) { : gamePath_(gamePath), info_(info) {
} }
~GameInfoWorkItem() override { ~GameInfoWorkItem() {
info_->pending.store(false); info_->pending.store(false);
info_->working.store(false); info_->working.store(false);
info_->DisposeFileLoader(); info_->DisposeFileLoader();

View File

@ -27,13 +27,13 @@
class InstallZipScreen : public UIDialogScreenWithBackground { class InstallZipScreen : public UIDialogScreenWithBackground {
public: public:
InstallZipScreen(const Path &zipPath); InstallZipScreen(const Path &zipPath);
virtual void update() override; void update() override;
virtual bool key(const KeyInput &key) override; bool key(const KeyInput &key) override;
const char *tag() const override { return "InstallZip"; } const char *tag() const override { return "InstallZip"; }
protected: protected:
virtual void CreateViews() override; void CreateViews() override;
private: private:
UI::EventReturn OnInstall(UI::EventParams &params); UI::EventReturn OnInstall(UI::EventParams &params);

View File

@ -434,7 +434,7 @@ public:
DirButton(const Path &path, const std::string &text, bool gridStyle, UI::LayoutParams *layoutParams = 0) DirButton(const Path &path, const std::string &text, bool gridStyle, UI::LayoutParams *layoutParams = 0)
: UI::Button(text, layoutParams), path_(path), gridStyle_(gridStyle), absolute_(true) {} : UI::Button(text, layoutParams), path_(path), gridStyle_(gridStyle), absolute_(true) {}
virtual void Draw(UIContext &dc); void Draw(UIContext &dc) override;
const Path &GetPath() const { const Path &GetPath() const {
return path_; return path_;
@ -1490,7 +1490,7 @@ void UmdReplaceScreen::CreateViews() {
tabAllGames->OnHoldChoice.Handle(this, &UmdReplaceScreen::OnGameSelected); tabAllGames->OnHoldChoice.Handle(this, &UmdReplaceScreen::OnGameSelected);
rightColumnItems->Add(new Choice(di->T("Cancel")))->OnClick.Handle(this, &UmdReplaceScreen::OnCancel); rightColumnItems->Add(new Choice(di->T("Cancel")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnCancel);
rightColumnItems->Add(new Choice(mm->T("Game Settings")))->OnClick.Handle(this, &UmdReplaceScreen::OnGameSettings); rightColumnItems->Add(new Choice(mm->T("Game Settings")))->OnClick.Handle(this, &UmdReplaceScreen::OnGameSettings);
if (g_Config.HasRecentIsos()) { if (g_Config.HasRecentIsos()) {
@ -1515,11 +1515,6 @@ UI::EventReturn UmdReplaceScreen::OnGameSelected(UI::EventParams &e) {
return UI::EVENT_DONE; return UI::EVENT_DONE;
} }
UI::EventReturn UmdReplaceScreen::OnCancel(UI::EventParams &e) {
TriggerFinish(DR_CANCEL);
return UI::EVENT_DONE;
}
UI::EventReturn UmdReplaceScreen::OnGameSettings(UI::EventParams &e) { UI::EventReturn UmdReplaceScreen::OnGameSettings(UI::EventParams &e) {
screenManager()->push(new GameSettingsScreen(Path())); screenManager()->push(new GameSettingsScreen(Path()));
return UI::EVENT_DONE; return UI::EVENT_DONE;

View File

@ -165,7 +165,6 @@ private:
UI::EventReturn OnGameSelected(UI::EventParams &e); UI::EventReturn OnGameSelected(UI::EventParams &e);
UI::EventReturn OnGameSelectedInstant(UI::EventParams &e); UI::EventReturn OnGameSelectedInstant(UI::EventParams &e);
UI::EventReturn OnCancel(UI::EventParams &e);
UI::EventReturn OnGameSettings(UI::EventParams &e); UI::EventReturn OnGameSettings(UI::EventParams &e);
}; };

View File

@ -157,7 +157,6 @@ public:
class FloatingSymbolsAnimation : public Animation { class FloatingSymbolsAnimation : public Animation {
public: public:
~FloatingSymbolsAnimation() override {}
void Draw(UIContext &dc, double t, float alpha, float x, float y, float z) override { void Draw(UIContext &dc, double t, float alpha, float x, float y, float z) override {
float xres = dc.GetBounds().w; float xres = dc.GetBounds().w;
float yres = dc.GetBounds().h; float yres = dc.GetBounds().h;
@ -196,7 +195,6 @@ private:
class RecentGamesAnimation : public Animation { class RecentGamesAnimation : public Animation {
public: public:
~RecentGamesAnimation() override {}
void Draw(UIContext &dc, double t, float alpha, float x, float y, float z) override { void Draw(UIContext &dc, double t, float alpha, float x, float y, float z) override {
if (lastIndex_ == nextIndex_) { if (lastIndex_ == nextIndex_) {
CheckNext(dc, t); CheckNext(dc, t);
@ -812,7 +810,7 @@ void CreditsScreen::CreateViews() {
root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT)); root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT));
Button *back = root_->Add(new Button(di->T("Back"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 10, false))); Button *back = root_->Add(new Button(di->T("Back"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 10, false)));
back->OnClick.Handle(this, &CreditsScreen::OnOK); back->OnClick.Handle<UIScreen>(this, &UIScreen::OnOK);
root_->SetDefaultFocusView(back); root_->SetDefaultFocusView(back);
// Really need to redo this whole layout with some linear layouts... // Really need to redo this whole layout with some linear layouts...
@ -881,11 +879,6 @@ UI::EventReturn CreditsScreen::OnShare(UI::EventParams &e) {
return UI::EVENT_DONE; return UI::EVENT_DONE;
} }
UI::EventReturn CreditsScreen::OnOK(UI::EventParams &e) {
TriggerFinish(DR_OK);
return UI::EVENT_DONE;
}
CreditsScreen::CreditsScreen() { CreditsScreen::CreditsScreen() {
startTime_ = time_now_d(); startTime_ = time_now_d();
} }

View File

@ -161,8 +161,6 @@ public:
const char *tag() const override { return "Credits"; } const char *tag() const override { return "Credits"; }
private: private:
UI::EventReturn OnOK(UI::EventParams &e);
UI::EventReturn OnSupport(UI::EventParams &e); UI::EventReturn OnSupport(UI::EventParams &e);
UI::EventReturn OnPPSSPPOrg(UI::EventParams &e); UI::EventReturn OnPPSSPPOrg(UI::EventParams &e);
UI::EventReturn OnPrivacy(UI::EventParams &e); UI::EventReturn OnPrivacy(UI::EventParams &e);
@ -183,7 +181,7 @@ public:
} }
void Show(const std::string &text, UI::View *refView = nullptr); void Show(const std::string &text, UI::View *refView = nullptr);
void Draw(UIContext &dc); void Draw(UIContext &dc) override;
std::string GetText() const; std::string GetText() const;
private: private:

View File

@ -33,7 +33,7 @@ enum class PauseScreenMode {
class GamePauseScreen : public UIDialogScreenWithGameBackground { class GamePauseScreen : public UIDialogScreenWithGameBackground {
public: public:
GamePauseScreen(const Path &filename) : UIDialogScreenWithGameBackground(filename), gamePath_(filename) {} GamePauseScreen(const Path &filename) : UIDialogScreenWithGameBackground(filename), gamePath_(filename) {}
virtual ~GamePauseScreen(); ~GamePauseScreen();
void dialogFinished(const Screen *dialog, DialogResult dr) override; void dialogFinished(const Screen *dialog, DialogResult dr) override;

View File

@ -57,7 +57,7 @@ enum class ScanStatus {
class RemoteISOConnectScreen : public UIScreenWithBackground { class RemoteISOConnectScreen : public UIScreenWithBackground {
public: public:
RemoteISOConnectScreen(); RemoteISOConnectScreen();
~RemoteISOConnectScreen() override; ~RemoteISOConnectScreen();
const char *tag() const override { return "RemoteISOConnect"; } const char *tag() const override { return "RemoteISOConnect"; }

View File

@ -43,7 +43,7 @@ class RatingChoice : public LinearLayout {
public: public:
RatingChoice(const char *captionKey, int *value, LayoutParams *layoutParams = 0); RatingChoice(const char *captionKey, int *value, LayoutParams *layoutParams = 0);
RatingChoice *SetEnabledPtr(bool *enabled); RatingChoice *SetEnabledPtrs(bool *enabled);
Event OnChoice; Event OnChoice;
@ -94,7 +94,7 @@ void RatingChoice::Update() {
} }
} }
RatingChoice *RatingChoice::SetEnabledPtr(bool *ptr) { RatingChoice *RatingChoice::SetEnabledPtrs(bool *ptr) {
for (int i = 0; i < TotalChoices(); i++) { for (int i = 0; i < TotalChoices(); i++) {
GetChoice(i)->SetEnabledPtr(ptr); GetChoice(i)->SetEnabledPtr(ptr);
} }
@ -139,8 +139,8 @@ public:
CompatRatingChoice(const char *captionKey, int *value, LayoutParams *layoutParams = 0); CompatRatingChoice(const char *captionKey, int *value, LayoutParams *layoutParams = 0);
protected: protected:
virtual void SetupChoices() override; void SetupChoices() override;
virtual int TotalChoices() override { int TotalChoices() override {
return 5; return 5;
} }
}; };
@ -295,16 +295,16 @@ void ReportScreen::CreateViews() {
screenshot_ = nullptr; screenshot_ = nullptr;
} }
leftColumnItems->Add(new CompatRatingChoice("Overall", (int *)&overall_))->SetEnabledPtr(&enableReporting_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); leftColumnItems->Add(new CompatRatingChoice("Overall", (int *)&overall_))->SetEnabledPtrs(&enableReporting_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
overallDescription_ = leftColumnItems->Add(new TextView("", FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(10, 0)))); overallDescription_ = leftColumnItems->Add(new TextView("", FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(10, 0))));
overallDescription_->SetShadow(true); overallDescription_->SetShadow(true);
UI::Orientation ratingsOrient = leftColumnWidth >= 750.0f ? ORIENT_HORIZONTAL : ORIENT_VERTICAL; UI::Orientation ratingsOrient = leftColumnWidth >= 750.0f ? ORIENT_HORIZONTAL : ORIENT_VERTICAL;
UI::LinearLayout *ratingsHolder = new LinearLayoutList(ratingsOrient, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT)); UI::LinearLayout *ratingsHolder = new LinearLayoutList(ratingsOrient, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT));
leftColumnItems->Add(ratingsHolder); leftColumnItems->Add(ratingsHolder);
ratingsHolder->Add(new RatingChoice("Graphics", &graphics_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); ratingsHolder->Add(new RatingChoice("Graphics", &graphics_))->SetEnabledPtrs(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
ratingsHolder->Add(new RatingChoice("Speed", &speed_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); ratingsHolder->Add(new RatingChoice("Speed", &speed_))->SetEnabledPtrs(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
ratingsHolder->Add(new RatingChoice("Gameplay", &gameplay_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); ratingsHolder->Add(new RatingChoice("Gameplay", &gameplay_))->SetEnabledPtrs(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
rightColumnItems->SetSpacing(0.0f); rightColumnItems->SetSpacing(0.0f);
rightColumnItems->Add(new Choice(rp->T("Open Browser")))->OnClick.Handle(this, &ReportScreen::HandleBrowser); rightColumnItems->Add(new Choice(rp->T("Open Browser")))->OnClick.Handle(this, &ReportScreen::HandleBrowser);

View File

@ -27,18 +27,18 @@ class TouchControlLayoutScreen : public UIDialogScreenWithGameBackground {
public: public:
TouchControlLayoutScreen(const Path &gamePath) : UIDialogScreenWithGameBackground(gamePath) {} TouchControlLayoutScreen(const Path &gamePath) : UIDialogScreenWithGameBackground(gamePath) {}
virtual void CreateViews() override; void CreateViews() override;
virtual void dialogFinished(const Screen *dialog, DialogResult result) override; void dialogFinished(const Screen *dialog, DialogResult result) override;
virtual void onFinish(DialogResult reason) override; void onFinish(DialogResult reason) override;
virtual void update() override; void update() override;
virtual void resized() override; void resized() override;
const char *tag() const override { return "TouchControlLayout"; } const char *tag() const override { return "TouchControlLayout"; }
protected: protected:
virtual UI::EventReturn OnReset(UI::EventParams &e); UI::EventReturn OnReset(UI::EventParams &e);
virtual UI::EventReturn OnVisibility(UI::EventParams &e); UI::EventReturn OnVisibility(UI::EventParams &e);
virtual UI::EventReturn OnMode(UI::EventParams &e); UI::EventReturn OnMode(UI::EventParams &e);
private: private:
UI::ChoiceStrip *mode_ = nullptr; UI::ChoiceStrip *mode_ = nullptr;

View File

@ -116,12 +116,12 @@ class WindowsCaptureDevice;
class ReaderCallback final : public IMFSourceReaderCallback { class ReaderCallback final : public IMFSourceReaderCallback {
public: public:
ReaderCallback(WindowsCaptureDevice *device); ReaderCallback(WindowsCaptureDevice *device);
~ReaderCallback(); virtual ~ReaderCallback();
// IUnknown methods. // IUnknown methods.
STDMETHODIMP QueryInterface(REFIID iid, void** ppv); STDMETHODIMP QueryInterface(REFIID iid, void** ppv) override;
STDMETHODIMP_(ULONG) AddRef() { return 0; } // Unused, just define. STDMETHODIMP_(ULONG) AddRef() override { return 0; } // Unused, just define.
STDMETHODIMP_(ULONG) Release() { return 0; } // Unused, just define. STDMETHODIMP_(ULONG) Release() override { return 0; } // Unused, just define.
// IMFSourceReaderCallback methods. // IMFSourceReaderCallback methods.
STDMETHODIMP OnReadSample( STDMETHODIMP OnReadSample(
@ -130,10 +130,10 @@ public:
DWORD dwStreamFlags, DWORD dwStreamFlags,
LONGLONG llTimestamp, LONGLONG llTimestamp,
IMFSample *pSample // Can be null,even if hrStatus is success. IMFSample *pSample // Can be null,even if hrStatus is success.
); ) override;
STDMETHODIMP OnEvent(DWORD, IMFMediaEvent *) { return S_OK; } STDMETHODIMP OnEvent(DWORD, IMFMediaEvent *) override { return S_OK; }
STDMETHODIMP OnFlush(DWORD) { return S_OK; } STDMETHODIMP OnFlush(DWORD) override { return S_OK; }
AVPixelFormat getAVVideoFormatbyMFVideoFormat(const GUID &MFVideoFormat); AVPixelFormat getAVVideoFormatbyMFVideoFormat(const GUID &MFVideoFormat);
AVSampleFormat getAVAudioFormatbyMFAudioFormat(const GUID &MFAudioFormat, const u32 &bitsPerSample); AVSampleFormat getAVAudioFormatbyMFAudioFormat(const GUID &MFAudioFormat, const u32 &bitsPerSample);

View File

@ -11,7 +11,7 @@ struct IDirectSoundBuffer;
class DSoundAudioBackend : public WindowsAudioBackend { class DSoundAudioBackend : public WindowsAudioBackend {
public: public:
DSoundAudioBackend(); DSoundAudioBackend();
~DSoundAudioBackend() override; ~DSoundAudioBackend();
bool Init(HWND window, StreamCallback callback, int sampleRate) override; // If fails, can safely delete the object bool Init(HWND window, StreamCallback callback, int sampleRate) override; // If fails, can safely delete the object
void Update() override; void Update() override;

View File

@ -15,11 +15,11 @@ public:
void showMenu(int itemIndex, const POINT &pt); void showMenu(int itemIndex, const POINT &pt);
const char* getCurrentThreadName(); const char* getCurrentThreadName();
protected: protected:
virtual bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue); bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override;
virtual void GetColumnText(wchar_t* dest, int row, int col); void GetColumnText(wchar_t *dest, int row, int col) override;
virtual int GetRowCount() { return (int) threads.size(); }; int GetRowCount() override { return (int) threads.size(); }
virtual void OnDoubleClick(int itemIndex, int column); void OnDoubleClick(int itemIndex, int column) override;
virtual void OnRightClick(int itemIndex, int column, const POINT& point); void OnRightClick(int itemIndex, int column, const POINT &point) override;
private: private:
std::vector<DebugThreadInfo> threads; std::vector<DebugThreadInfo> threads;
}; };
@ -31,14 +31,13 @@ class CtrlBreakpointList: public GenericListControl
public: public:
CtrlBreakpointList(HWND hwnd, DebugInterface* cpu, CtrlDisAsmView* disasm); CtrlBreakpointList(HWND hwnd, DebugInterface* cpu, CtrlDisAsmView* disasm);
void reloadBreakpoints(); void reloadBreakpoints();
void showMenu(int itemIndex, const POINT &pt);
protected: protected:
virtual bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue); bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override;
virtual void GetColumnText(wchar_t* dest, int row, int col); void GetColumnText(wchar_t *dest, int row, int col) override;
virtual int GetRowCount() { return getTotalBreakpointCount(); }; int GetRowCount() override { return getTotalBreakpointCount(); }
virtual void OnDoubleClick(int itemIndex, int column); void OnDoubleClick(int itemIndex, int column) override;
virtual void OnRightClick(int itemIndex, int column, const POINT& point); void OnRightClick(int itemIndex, int column, const POINT &point) override;
virtual void OnToggle(int item, bool newValue); void OnToggle(int item, bool newValue) override;
private: private:
std::vector<BreakPoint> displayedBreakPoints_; std::vector<BreakPoint> displayedBreakPoints_;
std::vector<MemCheck> displayedMemChecks_; std::vector<MemCheck> displayedMemChecks_;
@ -61,10 +60,10 @@ public:
CtrlStackTraceView(HWND hwnd, DebugInterface* cpu, CtrlDisAsmView* disasm); CtrlStackTraceView(HWND hwnd, DebugInterface* cpu, CtrlDisAsmView* disasm);
void loadStackTrace(); void loadStackTrace();
protected: protected:
virtual bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue); bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override;
virtual void GetColumnText(wchar_t* dest, int row, int col); void GetColumnText(wchar_t *dest, int row, int col) override;
virtual int GetRowCount() { return (int)frames.size(); }; int GetRowCount() override { return (int)frames.size(); }
virtual void OnDoubleClick(int itemIndex, int column); void OnDoubleClick(int itemIndex, int column) override;
private: private:
std::vector<MIPSStackWalk::StackFrame> frames; std::vector<MIPSStackWalk::StackFrame> frames;
DebugInterface* cpu; DebugInterface* cpu;
@ -77,11 +76,11 @@ public:
CtrlModuleList(HWND hwnd, DebugInterface* cpu); CtrlModuleList(HWND hwnd, DebugInterface* cpu);
void loadModules(); void loadModules();
protected: protected:
virtual bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue); bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override;
virtual void GetColumnText(wchar_t* dest, int row, int col); void GetColumnText(wchar_t *dest, int row, int col) override;
virtual int GetRowCount() { return (int)modules.size(); }; int GetRowCount() override { return (int)modules.size(); }
virtual void OnDoubleClick(int itemIndex, int column); void OnDoubleClick(int itemIndex, int column) override;
private: private:
std::vector<LoadedModuleInfo> modules; std::vector<LoadedModuleInfo> modules;
DebugInterface* cpu; DebugInterface* cpu;
}; };

View File

@ -19,7 +19,7 @@ private:
HWND memViewHdl, symListHdl, editWnd, searchBoxHdl, srcListHdl; HWND memViewHdl, symListHdl, editWnd, searchBoxHdl, srcListHdl;
HWND layerDropdown_; HWND layerDropdown_;
HWND status_; HWND status_;
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
public: public:
int index; //helper int index; //helper
@ -33,11 +33,9 @@ public:
~CMemoryDlg(void); ~CMemoryDlg(void);
void Goto(u32 addr); void Goto(u32 addr);
void Update(void); void Update(void) override;
void NotifyMapLoaded(); void NotifyMapLoaded();
void NotifySearchCompleted();
void Size(void); void Size(void);
private: private:

View File

@ -10,7 +10,7 @@ public:
~CVFPUDlg(); ~CVFPUDlg();
void Goto(u32 addr); void Goto(u32 addr);
void Update(); void Update() override;
void Size(); void Size();
private: private:
@ -18,5 +18,5 @@ private:
DebugInterface *cpu; DebugInterface *cpu;
HFONT font; HFONT font;
int mode; int mode;
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
}; };

View File

@ -32,7 +32,7 @@ public:
//getDevices(), enumerates all devices if not done yet //getDevices(), enumerates all devices if not done yet
DinputDevice(int devnum); DinputDevice(int devnum);
~DinputDevice(); ~DinputDevice();
virtual int UpdateState() override; int UpdateState() override;
static size_t getNumPads(); static size_t getNumPads();
static void CheckDevices() { static void CheckDevices() {
needsCheck_ = true; needsCheck_ = true;

View File

@ -81,7 +81,7 @@ public:
StepCountDlg(HINSTANCE _hInstance, HWND _hParent); StepCountDlg(HINSTANCE _hInstance, HWND _hParent);
~StepCountDlg(); ~StepCountDlg();
protected: protected:
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
private: private:
void Jump(int count, bool relative); void Jump(int count, bool relative);
}; };
@ -94,7 +94,7 @@ public:
static void Init(); static void Init();
protected: protected:
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
private: private:
void SetupPreviews(); void SetupPreviews();

View File

@ -12,12 +12,15 @@ class CtrlDisplayListStack: public GenericListControl
{ {
public: public:
CtrlDisplayListStack(HWND hwnd); CtrlDisplayListStack(HWND hwnd);
void setDisplayList(DisplayList& _list) { list = _list; Update(); } void setDisplayList(const DisplayList &_list) {
list = _list;
Update();
}
protected: protected:
virtual bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue) { return false; }; bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override { return false; }
virtual void GetColumnText(wchar_t* dest, int row, int col); void GetColumnText(wchar_t *dest, int row, int col) override;
virtual int GetRowCount() { return list.stackptr; }; int GetRowCount() override { return list.stackptr; }
virtual void OnDoubleClick(int itemIndex, int column); void OnDoubleClick(int itemIndex, int column) override;
private: private:
DisplayList list; DisplayList list;
}; };
@ -26,12 +29,15 @@ class CtrlAllDisplayLists: public GenericListControl
{ {
public: public:
CtrlAllDisplayLists(HWND hwnd); CtrlAllDisplayLists(HWND hwnd);
void setDisplayLists(std::vector<DisplayList>& _lists) { lists = _lists; Update(); }; void setDisplayLists(const std::vector<DisplayList> &_lists) {
lists = _lists;
Update();
}
protected: protected:
virtual bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue); bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override;
virtual void GetColumnText(wchar_t* dest, int row, int col); void GetColumnText(wchar_t *dest, int row, int col) override;
virtual int GetRowCount() { return (int) lists.size(); }; int GetRowCount() override { return (int) lists.size(); }
virtual void OnDoubleClick(int itemIndex, int column); void OnDoubleClick(int itemIndex, int column) override;
private: private:
std::vector<DisplayList> lists; std::vector<DisplayList> lists;
}; };
@ -43,7 +49,7 @@ public:
~TabDisplayLists(); ~TabDisplayLists();
void Update(bool reload = true); void Update(bool reload = true);
protected: protected:
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
private: private:
void UpdateSize(WORD width, WORD height); void UpdateSize(WORD width, WORD height);

View File

@ -63,7 +63,7 @@ public:
} }
protected: protected:
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
CtrlStateValues *values; CtrlStateValues *values;

View File

@ -35,9 +35,9 @@ public:
} }
protected: protected:
virtual bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue) { return false; }; bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override { return false; }
virtual void GetColumnText(wchar_t *dest, int row, int col); void GetColumnText(wchar_t *dest, int row, int col) override;
virtual int GetRowCount(); int GetRowCount() override;
private: private:
void FormatVertCol(wchar_t *dest, const GPUDebugVertex &vert, int col); void FormatVertCol(wchar_t *dest, const GPUDebugVertex &vert, int col);
@ -57,12 +57,12 @@ public:
TabVertices(HINSTANCE _hInstance, HWND _hParent); TabVertices(HINSTANCE _hInstance, HWND _hParent);
~TabVertices(); ~TabVertices();
virtual void Update() { void Update() override {
values->Update(); values->Update();
} }
protected: protected:
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
private: private:
void UpdateSize(WORD width, WORD height); void UpdateSize(WORD width, WORD height);
@ -98,12 +98,12 @@ public:
TabMatrices(HINSTANCE _hInstance, HWND _hParent); TabMatrices(HINSTANCE _hInstance, HWND _hParent);
~TabMatrices(); ~TabMatrices();
virtual void Update() { void Update() override {
values->Update(); values->Update();
} }
protected: protected:
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
private: private:
void UpdateSize(WORD width, WORD height); void UpdateSize(WORD width, WORD height);

View File

@ -38,7 +38,7 @@ public:
CMMNotificationClient() { CMMNotificationClient() {
} }
~CMMNotificationClient() { virtual ~CMMNotificationClient() {
CoTaskMemFree(currentDevice_); CoTaskMemFree(currentDevice_);
currentDevice_ = nullptr; currentDevice_ = nullptr;
SAFE_RELEASE(_pEnumerator) SAFE_RELEASE(_pEnumerator)

View File

@ -8,7 +8,7 @@
class WASAPIAudioBackend : public WindowsAudioBackend { class WASAPIAudioBackend : public WindowsAudioBackend {
public: public:
WASAPIAudioBackend(); WASAPIAudioBackend();
~WASAPIAudioBackend() override; ~WASAPIAudioBackend();
bool Init(HWND window, StreamCallback callback, int sampleRate) override; // If fails, can safely delete the object bool Init(HWND window, StreamCallback callback, int sampleRate) override; // If fails, can safely delete the object
void Update() override {} void Update() override {}

View File

@ -8,7 +8,7 @@ class XinputDevice final : public InputDevice {
public: public:
XinputDevice(); XinputDevice();
~XinputDevice(); ~XinputDevice();
virtual int UpdateState() override; int UpdateState() override;
private: private:
void UpdatePad(int pad, const XINPUT_STATE &state, XINPUT_VIBRATION &vibration); void UpdatePad(int pad, const XINPUT_STATE &state, XINPUT_VIBRATION &vibration);

View File

@ -138,11 +138,11 @@ protected:
BufferedLineReader() { BufferedLineReader() {
} }
virtual bool HasMoreLines() { bool HasMoreLines() {
return pos_ != data_.npos; return pos_ != data_.npos;
} }
virtual std::string ReadLine() { std::string ReadLine() {
size_t next = data_.find('\n', pos_); size_t next = data_.find('\n', pos_);
if (next == data_.npos) { if (next == data_.npos) {
std::string result = data_.substr(pos_); std::string result = data_.substr(pos_);

View File

@ -65,7 +65,7 @@ bool audioRecording_State() { return false; }
class PrintfLogger : public LogListener { class PrintfLogger : public LogListener {
public: public:
void Log(const LogMessage &message) { void Log(const LogMessage &message) override {
switch (message.level) { switch (message.level) {
case LogTypes::LVERBOSE: case LogTypes::LVERBOSE:
fprintf(stderr, "V %s", message.msg.c_str()); fprintf(stderr, "V %s", message.msg.c_str());

View File

@ -74,8 +74,8 @@ class IncrementTask : public Task {
public: public:
IncrementTask(TaskType type, LimitedWaitable *waitable) : type_(type), waitable_(waitable) {} IncrementTask(TaskType type, LimitedWaitable *waitable) : type_(type), waitable_(waitable) {}
~IncrementTask() {} ~IncrementTask() {}
virtual TaskType Type() const { return type_; } TaskType Type() const override { return type_; }
virtual void Run() { void Run() override {
g_atomicCounter++; g_atomicCounter++;
waitable_->Notify(); waitable_->Notify();
} }