2014-09-28 17:21:45 +02:00
|
|
|
#include "stdafx.h"
|
|
|
|
|
#include "Ini.h"
|
|
|
|
|
#include "Emu/Memory/Memory.h"
|
|
|
|
|
#include "Emu/SysCalls/Modules.h"
|
|
|
|
|
#include "Emu/RSX/sysutil_video.h"
|
|
|
|
|
|
2015-06-19 17:49:38 +02:00
|
|
|
namespace vm { using namespace ps3; }
|
|
|
|
|
|
2015-02-18 17:22:06 +01:00
|
|
|
extern Module cellAvconfExt;
|
2014-09-28 17:21:45 +02:00
|
|
|
|
2015-07-09 02:33:15 +02:00
|
|
|
s32 cellVideoOutConvertCursorColor()
|
2014-09-28 17:21:45 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-24 16:06:30 +02:00
|
|
|
s32 cellVideoOutGetScreenSize(u32 videoOut, vm::ptr<float> screenSize)
|
2014-09-28 17:21:45 +02:00
|
|
|
{
|
2015-04-24 16:06:30 +02:00
|
|
|
cellAvconfExt.Warning("cellVideoOutGetScreenSize(videoOut=%d, screenSize=*0x%x)", videoOut, screenSize);
|
2014-09-28 17:21:45 +02:00
|
|
|
|
2015-01-02 16:29:57 +01:00
|
|
|
if (videoOut != CELL_VIDEO_OUT_PRIMARY)
|
|
|
|
|
{
|
2014-09-28 17:21:45 +02:00
|
|
|
return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT;
|
2015-01-02 16:29:57 +01:00
|
|
|
}
|
2014-09-28 17:21:45 +02:00
|
|
|
|
2014-11-19 15:16:30 +01:00
|
|
|
//TODO: Use virtual screen size
|
2014-09-28 18:42:37 +02:00
|
|
|
#ifdef _WIN32
|
2015-04-24 16:06:30 +02:00
|
|
|
//HDC screen = GetDC(NULL);
|
|
|
|
|
//float diagonal = roundf(sqrtf((powf(float(GetDeviceCaps(screen, HORZSIZE)), 2) + powf(float(GetDeviceCaps(screen, VERTSIZE)), 2))) * 0.0393f);
|
2014-09-28 18:42:37 +02:00
|
|
|
#else
|
|
|
|
|
// TODO: Linux implementation, without using wx
|
2015-01-02 16:29:57 +01:00
|
|
|
// float diagonal = roundf(sqrtf((powf(wxGetDisplaySizeMM().GetWidth(), 2) + powf(wxGetDisplaySizeMM().GetHeight(), 2))) * 0.0393f);
|
2014-09-28 18:42:37 +02:00
|
|
|
#endif
|
2014-09-28 17:21:45 +02:00
|
|
|
|
|
|
|
|
if (Ini.GS3DTV.GetValue())
|
|
|
|
|
{
|
2015-04-24 16:06:30 +02:00
|
|
|
*screenSize = 24.0f;
|
2014-09-28 17:21:45 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return CELL_VIDEO_OUT_ERROR_VALUE_IS_NOT_SET;
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-24 16:06:30 +02:00
|
|
|
s32 cellVideoOutGetGamma()
|
2014-09-28 17:21:45 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-24 16:06:30 +02:00
|
|
|
s32 cellVideoOutSetGamma()
|
2014-09-28 17:21:45 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-18 17:22:06 +01:00
|
|
|
Module cellAvconfExt("cellAvconfExt", []()
|
2014-09-28 17:21:45 +02:00
|
|
|
{
|
2015-01-02 16:29:57 +01:00
|
|
|
REG_FUNC(cellAvconfExt, cellVideoOutConvertCursorColor);
|
|
|
|
|
REG_FUNC(cellAvconfExt, cellVideoOutGetScreenSize);
|
|
|
|
|
REG_FUNC(cellAvconfExt, cellVideoOutGetGamma);
|
|
|
|
|
REG_FUNC(cellAvconfExt, cellVideoOutSetGamma);
|
2015-02-18 17:22:06 +01:00
|
|
|
});
|