2012-11-15 00:39:56 +01:00
|
|
|
#pragma once
|
|
|
|
|
#include "sysutil_video.h"
|
|
|
|
|
#include "GSRender.h"
|
|
|
|
|
|
|
|
|
|
struct GSInfo
|
|
|
|
|
{
|
2013-06-30 10:46:29 +02:00
|
|
|
struct
|
|
|
|
|
{
|
|
|
|
|
u8 resolutionId;
|
|
|
|
|
u8 scanMode;
|
|
|
|
|
u8 conversion;
|
|
|
|
|
u8 aspect;
|
2014-04-04 15:25:38 +02:00
|
|
|
u8 format;
|
2013-06-30 10:46:29 +02:00
|
|
|
u16 refreshRates;
|
2014-04-04 15:25:38 +02:00
|
|
|
u32 pitch;
|
2013-06-30 10:46:29 +02:00
|
|
|
} mode;
|
|
|
|
|
//CellVideoOutDisplayMode mode;
|
2012-11-15 00:39:56 +01:00
|
|
|
|
|
|
|
|
GSInfo()
|
|
|
|
|
{
|
2013-06-30 10:46:29 +02:00
|
|
|
}
|
2012-11-15 00:39:56 +01:00
|
|
|
|
2013-06-30 10:46:29 +02:00
|
|
|
void Init()
|
|
|
|
|
{
|
|
|
|
|
mode.resolutionId = Ini.GSResolution.GetValue();
|
2012-11-15 00:39:56 +01:00
|
|
|
mode.scanMode = CELL_VIDEO_OUT_SCAN_MODE_INTERLACE;
|
|
|
|
|
mode.conversion = CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE;
|
2013-06-30 10:46:29 +02:00
|
|
|
mode.aspect = Ini.GSAspectRatio.GetValue();
|
2012-11-15 00:39:56 +01:00
|
|
|
mode.refreshRates = CELL_VIDEO_OUT_REFRESH_RATE_50HZ;
|
2013-06-30 10:46:29 +02:00
|
|
|
mode.format = CELL_VIDEO_OUT_BUFFER_COLOR_FORMAT_X8R8G8B8;
|
|
|
|
|
mode.pitch = 4;
|
2012-11-15 00:39:56 +01:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct gcmBuffer
|
|
|
|
|
{
|
|
|
|
|
u32 offset;
|
|
|
|
|
u32 pitch;
|
|
|
|
|
u32 width;
|
|
|
|
|
u32 height;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class GSManager
|
|
|
|
|
{
|
|
|
|
|
GSInfo m_info;
|
|
|
|
|
GSRender* m_render;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
GSManager();
|
|
|
|
|
|
|
|
|
|
void Init();
|
|
|
|
|
void Close();
|
|
|
|
|
|
2014-01-07 08:30:41 +01:00
|
|
|
bool IsInited() const { return m_render != nullptr; }
|
|
|
|
|
|
2012-11-15 00:39:56 +01:00
|
|
|
GSInfo& GetInfo() { return m_info; }
|
2013-06-30 10:46:29 +02:00
|
|
|
GSRender& GetRender() { assert(m_render); return *m_render; }
|
2012-11-15 00:39:56 +01:00
|
|
|
|
|
|
|
|
u8 GetState();
|
|
|
|
|
u8 GetColorSpace();
|
|
|
|
|
};
|