VdGetCurrentDisplayGamma and VdQueryVideoFlags.
This commit is contained in:
parent
c9a39a8b62
commit
8d5e877a03
|
@ -40,8 +40,45 @@ namespace xboxkrnl {
|
|||
// http://www.microsoft.com/en-za/download/details.aspx?id=5313 -- "Stripped Down Direct3D: Xbox 360 Command Buffer and Resource Management"
|
||||
|
||||
|
||||
// VdQueryVideoFlags
|
||||
// return 0x7?
|
||||
void xeVdGetCurrentDisplayGamma(uint32_t* arg0, float* arg1) {
|
||||
*arg0 = 2;
|
||||
*arg1 = 2.22222233f;
|
||||
}
|
||||
|
||||
|
||||
SHIM_CALL VdGetCurrentDisplayGamma_shim(
|
||||
xe_ppc_state_t* ppc_state, KernelState* state) {
|
||||
uint32_t arg0_ptr = SHIM_GET_ARG_32(0);
|
||||
uint32_t arg1_ptr = SHIM_GET_ARG_32(1);
|
||||
|
||||
XELOGD(
|
||||
"VdGetCurrentDisplayGamma(%.8X, %.8X)",
|
||||
arg0_ptr, arg1_ptr);
|
||||
|
||||
uint32_t arg0 = 0;
|
||||
union {
|
||||
float float_value;
|
||||
uint32_t uint_value;
|
||||
} arg1;
|
||||
xeVdGetCurrentDisplayGamma(&arg0, &arg1.float_value);
|
||||
SHIM_SET_MEM_32(arg0_ptr, arg0);
|
||||
SHIM_SET_MEM_32(arg1_ptr, arg1.uint_value);
|
||||
}
|
||||
|
||||
|
||||
uint32_t xeVdQueryVideoFlags() {
|
||||
// ?
|
||||
return 0x00000007;
|
||||
}
|
||||
|
||||
|
||||
SHIM_CALL VdQueryVideoFlags_shim(
|
||||
xe_ppc_state_t* ppc_state, KernelState* state) {
|
||||
XELOGD(
|
||||
"VdQueryVideoFlags()");
|
||||
|
||||
SHIM_SET_RETURN(xeVdQueryVideoFlags());
|
||||
}
|
||||
|
||||
|
||||
void xeVdQueryVideoMode(X_VIDEO_MODE *video_mode, bool swap) {
|
||||
|
@ -243,11 +280,13 @@ SHIM_CALL VdEnableRingBufferRPtrWriteBack_shim(
|
|||
|
||||
void xe::kernel::xboxkrnl::RegisterVideoExports(
|
||||
ExportResolver* export_resolver, KernelState* state) {
|
||||
SHIM_SET_MAPPING("xboxkrnl.exe", VdGetCurrentDisplayGamma, state);
|
||||
SHIM_SET_MAPPING("xboxkrnl.exe", VdQueryVideoFlags, state);
|
||||
SHIM_SET_MAPPING("xboxkrnl.exe", VdQueryVideoMode, state);
|
||||
SHIM_SET_MAPPING("xboxkrnl.exe", VdInitializeEngines, state);
|
||||
SHIM_SET_MAPPING("xboxkrnl.exe", VdSetGraphicsInterruptCallback, state);
|
||||
SHIM_SET_MAPPING("xboxkrnl.exe", VdInitializeRingBuffer, state);
|
||||
SHIM_SET_MAPPING("xboxkrnl.exe", VdEnableRingBufferRPtrWriteBack, state);
|
||||
SHIM_SET_MAPPING("xboxkrnl.exe", VdEnableRingBufferRPtrWriteBack, state);
|
||||
|
||||
xe_memory_ref memory = state->memory();
|
||||
uint8_t* mem = xe_memory_addr(memory);
|
||||
|
|
|
@ -37,6 +37,8 @@ X_VIDEO_MODE;
|
|||
#pragma pack(pop)
|
||||
XEASSERTSTRUCTSIZE(X_VIDEO_MODE, 48);
|
||||
|
||||
void xeVdGetCurrentDisplayGamma(uint32_t* arg0, float* arg1);
|
||||
uint32_t xeVdQueryVideoFlags();
|
||||
void xeVdQueryVideoMode(X_VIDEO_MODE *video_mode, bool swap);
|
||||
|
||||
void xeVdInitializeEngines(uint32_t unk0, uint32_t callback, uint32_t unk1,
|
||||
|
|
Loading…
Reference in New Issue