mirror of
https://github.com/SysRay/psOff_public.git
synced 2024-11-23 14:29:39 +00:00
57 lines
1.0 KiB
C++
57 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include "SDL2/SDL.h"
|
|
#include "utility/utility.h"
|
|
|
|
#define GAMEREPORT_USER_SEND_SCANCODE SDL_SCANCODE_F11
|
|
#define GAMEREPORT_REPO_NAME "SysRay/psOff_compatibility"
|
|
|
|
class IGameReport {
|
|
CLASS_NO_COPY(IGameReport);
|
|
CLASS_NO_MOVE(IGameReport);
|
|
|
|
protected:
|
|
bool m_bEnabled = true;
|
|
|
|
IGameReport() = default;
|
|
|
|
public:
|
|
virtual ~IGameReport() = default;
|
|
|
|
enum Type {
|
|
USER,
|
|
EXCEPTION,
|
|
MISSING_SYMBOL,
|
|
};
|
|
|
|
union AdditionalData {
|
|
std::exception* ex;
|
|
const char* message;
|
|
const void* ptr;
|
|
};
|
|
|
|
struct Info {
|
|
const char* title;
|
|
const char* title_id;
|
|
const char* app_ver;
|
|
const char* emu_ver;
|
|
SDL_Window* wnd;
|
|
|
|
Type type;
|
|
AdditionalData add;
|
|
};
|
|
|
|
void SetStatus(bool enabled) { m_bEnabled = enabled; };
|
|
|
|
virtual void ShowReportWindow(const Info&) = 0;
|
|
};
|
|
|
|
#ifdef __APICALL_EXTERN
|
|
#define __APICALL __declspec(dllexport)
|
|
#else
|
|
#define __APICALL __declspec(dllimport)
|
|
#endif
|
|
|
|
__APICALL IGameReport& accessGameReport();
|
|
#undef __APICALL
|