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-02-18 17:22:06 +01:00
|
|
|
extern Module cellAvconfExt;
|
2014-09-28 17:21:45 +02:00
|
|
|
|
2015-07-30 00:30:13 +02:00
|
|
|
s32 cellAudioOutUnregisterDevice()
|
|
|
|
|
{
|
|
|
|
|
throw EXCEPTION("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 cellAudioOutGetDeviceInfo2()
|
|
|
|
|
{
|
|
|
|
|
throw EXCEPTION("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 cellVideoOutSetXVColor()
|
|
|
|
|
{
|
|
|
|
|
throw EXCEPTION("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 cellVideoOutSetupDisplay()
|
|
|
|
|
{
|
|
|
|
|
throw EXCEPTION("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 cellAudioInGetDeviceInfo()
|
|
|
|
|
{
|
|
|
|
|
throw EXCEPTION("");
|
|
|
|
|
}
|
|
|
|
|
|
2015-07-09 02:33:15 +02:00
|
|
|
s32 cellVideoOutConvertCursorColor()
|
2014-09-28 17:21:45 +02:00
|
|
|
{
|
2015-07-30 00:30:13 +02:00
|
|
|
throw EXCEPTION("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 cellVideoOutGetGamma()
|
|
|
|
|
{
|
|
|
|
|
throw EXCEPTION("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 cellAudioInGetAvailableDeviceInfo()
|
|
|
|
|
{
|
|
|
|
|
throw EXCEPTION("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 cellAudioOutGetAvailableDeviceInfo()
|
|
|
|
|
{
|
|
|
|
|
throw EXCEPTION("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 cellVideoOutSetGamma()
|
|
|
|
|
{
|
|
|
|
|
throw EXCEPTION("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 cellAudioOutRegisterDevice()
|
|
|
|
|
{
|
|
|
|
|
throw EXCEPTION("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 cellAudioOutSetDeviceMode()
|
|
|
|
|
{
|
|
|
|
|
throw EXCEPTION("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 cellAudioInSetDeviceMode()
|
|
|
|
|
{
|
|
|
|
|
throw EXCEPTION("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 cellAudioInRegisterDevice()
|
|
|
|
|
{
|
|
|
|
|
throw EXCEPTION("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 cellAudioInUnregisterDevice()
|
|
|
|
|
{
|
|
|
|
|
throw EXCEPTION("");
|
2014-09-28 17:21:45 +02:00
|
|
|
}
|
|
|
|
|
|
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-02-18 17:22:06 +01:00
|
|
|
Module cellAvconfExt("cellAvconfExt", []()
|
2014-09-28 17:21:45 +02:00
|
|
|
{
|
2015-07-30 00:30:13 +02:00
|
|
|
REG_FUNC(cellAvconfExt, cellAudioOutUnregisterDevice);
|
|
|
|
|
REG_FUNC(cellAvconfExt, cellAudioOutGetDeviceInfo2);
|
|
|
|
|
REG_FUNC(cellAvconfExt, cellVideoOutSetXVColor);
|
|
|
|
|
REG_FUNC(cellAvconfExt, cellVideoOutSetupDisplay);
|
|
|
|
|
REG_FUNC(cellAvconfExt, cellAudioInGetDeviceInfo);
|
2015-01-02 16:29:57 +01:00
|
|
|
REG_FUNC(cellAvconfExt, cellVideoOutConvertCursorColor);
|
|
|
|
|
REG_FUNC(cellAvconfExt, cellVideoOutGetGamma);
|
2015-07-30 00:30:13 +02:00
|
|
|
REG_FUNC(cellAvconfExt, cellAudioInGetAvailableDeviceInfo);
|
|
|
|
|
REG_FUNC(cellAvconfExt, cellAudioOutGetAvailableDeviceInfo);
|
2015-01-02 16:29:57 +01:00
|
|
|
REG_FUNC(cellAvconfExt, cellVideoOutSetGamma);
|
2015-07-30 00:30:13 +02:00
|
|
|
REG_FUNC(cellAvconfExt, cellAudioOutRegisterDevice);
|
|
|
|
|
REG_FUNC(cellAvconfExt, cellAudioOutSetDeviceMode);
|
|
|
|
|
REG_FUNC(cellAvconfExt, cellAudioInSetDeviceMode);
|
|
|
|
|
REG_FUNC(cellAvconfExt, cellAudioInRegisterDevice);
|
|
|
|
|
REG_FUNC(cellAvconfExt, cellAudioInUnregisterDevice);
|
|
|
|
|
REG_FUNC(cellAvconfExt, cellVideoOutGetScreenSize);
|
2015-02-18 17:22:06 +01:00
|
|
|
});
|