mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
video out: Set up video configuration options in fxm
- TODO: Actually do something with the values
This commit is contained in:
parent
aeebeed0f2
commit
c6a2525c9b
3 changed files with 21 additions and 10 deletions
|
@ -1,6 +1,8 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/RSX/rsx_utils.h"
|
||||
|
||||
#include "cellAudioIn.h"
|
||||
#include "cellAudioOut.h"
|
||||
|
@ -9,8 +11,6 @@
|
|||
|
||||
logs::channel cellAvconfExt("cellAvconfExt");
|
||||
|
||||
vm::gvar<f32> g_gamma; // TODO
|
||||
|
||||
s32 cellAudioOutUnregisterDevice(u32 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;
|
||||
}
|
||||
|
||||
*gamma = *g_gamma;
|
||||
auto conf = fxm::get_always<rsx::avconf>();
|
||||
*gamma = conf->gamma;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -87,7 +88,8 @@ s32 cellVideoOutSetGamma(u32 videoOut, f32 gamma)
|
|||
return CELL_VIDEO_OUT_ERROR_ILLEGAL_PARAMETER;
|
||||
}
|
||||
|
||||
*g_gamma = gamma;
|
||||
auto conf = fxm::get_always<rsx::avconf>();
|
||||
conf->gamma = gamma;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -152,12 +154,6 @@ s32 cellVideoOutSetCopyControl(u32 videoOut, u32 control)
|
|||
|
||||
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, cellAudioOutGetDeviceInfo2);
|
||||
REG_FUNC(cellSysutilAvconfExt, cellVideoOutSetXVColor);
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/RSX/rsx_utils.h"
|
||||
|
||||
#include "cellVideoOut.h"
|
||||
|
||||
|
@ -145,6 +147,11 @@ error_code cellVideoOutConfigure(u32 videoOut, vm::ptr<CellVideoOutConfiguration
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
void pad_texture(void* input_pixels, void* output_pixels, u16 input_width, u16 input_height, u16 output_width, u16 output_height)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue