rpcsx/rpcs3/Emu/RSX/GSManager.cpp

45 lines
970 B
C++
Raw Normal View History

#include "stdafx.h"
#include "Emu/System.h"
2014-09-11 21:18:19 +02:00
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules/cellVideoOut.h"
#include "Emu/state.h"
2014-08-23 02:16:54 +02:00
#include "GSManager.h"
2014-08-23 02:16:54 +02:00
void GSInfo::Init()
{
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;
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;
}
void GSManager::Init()
{
2015-11-26 09:06:29 +01:00
if (m_render) return;
m_info.Init();
m_render = Emu.GetCallbacks().get_gs_render();
2015-10-21 09:24:02 +02:00
//m_render->Init(GetInfo().outresolution.width, GetInfo().outresolution.height);
}
void GSManager::Close()
{
2015-11-26 09:06:29 +01:00
m_render.reset();
}
u8 GSManager::GetState()
{
return CELL_VIDEO_OUT_OUTPUT_STATE_ENABLED;
}
u8 GSManager::GetColorSpace()
{
return CELL_VIDEO_OUT_COLOR_SPACE_RGB;
}