video out: Set up video configuration options in fxm
- TODO: Actually do something with the values
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
#include "Emu/Cell/PPUModule.h"
|
#include "Emu/Cell/PPUModule.h"
|
||||||
|
#include "Emu/IdManager.h"
|
||||||
|
#include "Emu/RSX/rsx_utils.h"
|
||||||
|
|
||||||
#include "cellAudioIn.h"
|
#include "cellAudioIn.h"
|
||||||
#include "cellAudioOut.h"
|
#include "cellAudioOut.h"
|
||||||
@@ -9,8 +11,6 @@
|
|||||||
|
|
||||||
logs::channel cellAvconfExt("cellAvconfExt");
|
logs::channel cellAvconfExt("cellAvconfExt");
|
||||||
|
|
||||||
vm::gvar<f32> g_gamma; // TODO
|
|
||||||
|
|
||||||
s32 cellAudioOutUnregisterDevice(u32 deviceNumber)
|
s32 cellAudioOutUnregisterDevice(u32 deviceNumber)
|
||||||
{
|
{
|
||||||
cellAvconfExt.todo("cellAudioOutUnregisterDevice(deviceNumber=0x%x)", deviceNumber);
|
cellAvconfExt.todo("cellAudioOutUnregisterDevice(deviceNumber=0x%x)", deviceNumber);
|
||||||
@@ -56,7 +56,8 @@ s32 cellVideoOutGetGamma(u32 videoOut, vm::ptr<f32> gamma)
|
|||||||
return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT;
|
return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
*gamma = *g_gamma;
|
auto conf = fxm::get_always<rsx::avconf>();
|
||||||
|
*gamma = conf->gamma;
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
@@ -87,7 +88,8 @@ s32 cellVideoOutSetGamma(u32 videoOut, f32 gamma)
|
|||||||
return CELL_VIDEO_OUT_ERROR_ILLEGAL_PARAMETER;
|
return CELL_VIDEO_OUT_ERROR_ILLEGAL_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
*g_gamma = gamma;
|
auto conf = fxm::get_always<rsx::avconf>();
|
||||||
|
conf->gamma = gamma;
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
@@ -152,12 +154,6 @@ s32 cellVideoOutSetCopyControl(u32 videoOut, u32 control)
|
|||||||
|
|
||||||
DECLARE(ppu_module_manager::cellAvconfExt)("cellSysutilAvconfExt", []()
|
DECLARE(ppu_module_manager::cellAvconfExt)("cellSysutilAvconfExt", []()
|
||||||
{
|
{
|
||||||
REG_VAR(cellSysutilAvconfExt, g_gamma).flag(MFF_HIDDEN).init = []
|
|
||||||
{
|
|
||||||
// Test
|
|
||||||
*g_gamma = 1.0f;
|
|
||||||
};
|
|
||||||
|
|
||||||
REG_FUNC(cellSysutilAvconfExt, cellAudioOutUnregisterDevice);
|
REG_FUNC(cellSysutilAvconfExt, cellAudioOutUnregisterDevice);
|
||||||
REG_FUNC(cellSysutilAvconfExt, cellAudioOutGetDeviceInfo2);
|
REG_FUNC(cellSysutilAvconfExt, cellAudioOutGetDeviceInfo2);
|
||||||
REG_FUNC(cellSysutilAvconfExt, cellVideoOutSetXVColor);
|
REG_FUNC(cellSysutilAvconfExt, cellVideoOutSetXVColor);
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
#include "Emu/Cell/PPUModule.h"
|
#include "Emu/Cell/PPUModule.h"
|
||||||
|
#include "Emu/IdManager.h"
|
||||||
|
#include "Emu/RSX/rsx_utils.h"
|
||||||
|
|
||||||
#include "cellVideoOut.h"
|
#include "cellVideoOut.h"
|
||||||
|
|
||||||
@@ -145,6 +147,11 @@ error_code cellVideoOutConfigure(u32 videoOut, vm::ptr<CellVideoOutConfiguration
|
|||||||
return CELL_VIDEO_OUT_ERROR_ILLEGAL_CONFIGURATION;
|
return CELL_VIDEO_OUT_ERROR_ILLEGAL_CONFIGURATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto conf = fxm::get_always<rsx::avconf>();
|
||||||
|
conf->aspect = config->aspect;
|
||||||
|
conf->format = config->format;
|
||||||
|
conf->scanline_pitch = config->pitch;
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,14 @@ namespace rsx
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct avconf
|
||||||
|
{
|
||||||
|
u8 format = 0; //XRGB
|
||||||
|
u8 aspect = 0; //AUTO
|
||||||
|
u32 scanline_pitch = 0; //PACKED
|
||||||
|
f32 gamma = 1.f; //NO GAMMA CORRECTION
|
||||||
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void pad_texture(void* input_pixels, void* output_pixels, u16 input_width, u16 input_height, u16 output_width, u16 output_height)
|
void pad_texture(void* input_pixels, void* output_pixels, u16 input_width, u16 input_height, u16 output_width, u16 output_height)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user