2012-11-15 00:39:56 +01:00
|
|
|
#include "stdafx.h"
|
2015-12-02 17:12:48 +01:00
|
|
|
#include "Emu/System.h"
|
2014-09-11 21:18:19 +02:00
|
|
|
#include "Emu/Memory/Memory.h"
|
2015-08-01 18:14:49 +02:00
|
|
|
#include "Emu/SysCalls/Modules/cellVideoOut.h"
|
2015-10-25 15:44:49 +01:00
|
|
|
#include "Emu/state.h"
|
2014-08-23 02:16:54 +02:00
|
|
|
|
2012-11-15 00:39:56 +01:00
|
|
|
#include "GSManager.h"
|
|
|
|
|
|
2014-08-23 02:16:54 +02:00
|
|
|
void GSInfo::Init()
|
|
|
|
|
{
|
2015-10-26 22:09:31 +01:00
|
|
|
mode.resolutionId = (u8)rpcs3::state.config.rsx.resolution.value();
|
2014-08-23 02:16:54 +02:00
|
|
|
mode.scanMode = CELL_VIDEO_OUT_SCAN_MODE_INTERLACE;
|
|
|
|
|
mode.conversion = CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE;
|
2015-10-26 22:09:31 +01:00
|
|
|
mode.aspect = (u8)rpcs3::state.config.rsx.aspect_ratio.value();
|
2014-08-23 02:16:54 +02:00
|
|
|
mode.refreshRates = CELL_VIDEO_OUT_REFRESH_RATE_50HZ;
|
|
|
|
|
mode.format = CELL_VIDEO_OUT_BUFFER_COLOR_FORMAT_X8R8G8B8;
|
|
|
|
|
mode.pitch = 4;
|
|
|
|
|
}
|
|
|
|
|
|
2012-11-15 00:39:56 +01:00
|
|
|
void GSManager::Init()
|
|
|
|
|
{
|
2015-11-26 09:06:29 +01:00
|
|
|
if (m_render) return;
|
2013-06-30 10:46:29 +02:00
|
|
|
|
|
|
|
|
m_info.Init();
|
|
|
|
|
|
2015-12-02 17:12:48 +01:00
|
|
|
m_render = Emu.GetCallbacks().get_gs_render();
|
2015-10-21 09:24:02 +02:00
|
|
|
|
2012-11-15 00:39:56 +01:00
|
|
|
//m_render->Init(GetInfo().outresolution.width, GetInfo().outresolution.height);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GSManager::Close()
|
|
|
|
|
{
|
2015-11-26 09:06:29 +01:00
|
|
|
m_render.reset();
|
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
|
|
|
}
|