2012-11-15 00:39:56 +01:00
|
|
|
#include "stdafx.h"
|
2014-06-17 17:44:03 +02:00
|
|
|
#include "Utilities/Log.h"
|
2014-06-02 19:27:24 +02:00
|
|
|
#include "Emu/Memory/Memory.h"
|
|
|
|
|
#include "rpcs3/Ini.h"
|
|
|
|
|
|
2012-11-15 00:39:56 +01:00
|
|
|
#include "GSManager.h"
|
|
|
|
|
#include "Null/NullGSRender.h"
|
|
|
|
|
#include "GL/GLGSRender.h"
|
|
|
|
|
|
2013-08-26 16:18:59 +02:00
|
|
|
GSManager::GSManager() : m_render(nullptr)
|
2012-11-15 00:39:56 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GSManager::Init()
|
|
|
|
|
{
|
|
|
|
|
if(m_render) return;
|
2013-06-30 10:46:29 +02:00
|
|
|
|
|
|
|
|
m_info.Init();
|
|
|
|
|
|
2012-11-15 00:39:56 +01:00
|
|
|
switch(Ini.GSRenderMode.GetValue())
|
|
|
|
|
{
|
|
|
|
|
default:
|
|
|
|
|
case 0: m_render = new NullGSRender(); break;
|
|
|
|
|
case 1: m_render = new GLGSRender(); break;
|
|
|
|
|
}
|
|
|
|
|
//m_render->Init(GetInfo().outresolution.width, GetInfo().outresolution.height);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GSManager::Close()
|
|
|
|
|
{
|
|
|
|
|
if(m_render)
|
|
|
|
|
{
|
|
|
|
|
m_render->Close();
|
2013-11-09 22:29:49 +01:00
|
|
|
delete m_render;
|
2013-06-30 10:46:29 +02:00
|
|
|
m_render = nullptr;
|
2012-11-15 00:39:56 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u8 GSManager::GetState()
|
|
|
|
|
{
|
|
|
|
|
return CELL_VIDEO_OUT_OUTPUT_STATE_ENABLED;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u8 GSManager::GetColorSpace()
|
|
|
|
|
{
|
|
|
|
|
return CELL_VIDEO_OUT_COLOR_SPACE_RGB;
|
2014-02-23 17:52:52 +01:00
|
|
|
}
|