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