Merge branch 'master' into d3d12
This commit is contained in:
commit
d8fccb2fa0
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
#include "xenia/kernel/xboxkrnl/xboxkrnl_video.h"
|
#include "xenia/kernel/xboxkrnl/xboxkrnl_video.h"
|
||||||
|
|
||||||
|
#include <gflags/gflags.h>
|
||||||
|
|
||||||
#include "xenia/base/logging.h"
|
#include "xenia/base/logging.h"
|
||||||
#include "xenia/emulator.h"
|
#include "xenia/emulator.h"
|
||||||
#include "xenia/gpu/graphics_system.h"
|
#include "xenia/gpu/graphics_system.h"
|
||||||
|
@ -20,6 +22,12 @@
|
||||||
#include "xenia/kernel/xboxkrnl/xboxkrnl_rtl.h"
|
#include "xenia/kernel/xboxkrnl/xboxkrnl_rtl.h"
|
||||||
#include "xenia/xbox.h"
|
#include "xenia/xbox.h"
|
||||||
|
|
||||||
|
DEFINE_int32(kernel_display_gamma_type, 1,
|
||||||
|
"Display gamma type: 0 - linear, 1 - sRGB, 2 - TV (BT.709), "
|
||||||
|
"3 - power specified via kernel_display_gamma_power.");
|
||||||
|
DEFINE_double(kernel_display_gamma_power, 2.22222233,
|
||||||
|
"Display gamma to use with kernel_display_gamma_type 3.");
|
||||||
|
|
||||||
namespace xe {
|
namespace xe {
|
||||||
namespace kernel {
|
namespace kernel {
|
||||||
namespace xboxkrnl {
|
namespace xboxkrnl {
|
||||||
|
@ -37,16 +45,14 @@ namespace xboxkrnl {
|
||||||
// https://www.microsoft.com/en-za/download/details.aspx?id=5313 -- "Stripped
|
// https://www.microsoft.com/en-za/download/details.aspx?id=5313 -- "Stripped
|
||||||
// Down Direct3D: Xbox 360 Command Buffer and Resource Management"
|
// Down Direct3D: Xbox 360 Command Buffer and Resource Management"
|
||||||
|
|
||||||
void VdGetCurrentDisplayGamma(lpdword_t type_ptr, lpfloat_t unknown_ptr) {
|
void VdGetCurrentDisplayGamma(lpdword_t type_ptr, lpfloat_t power_ptr) {
|
||||||
/*
|
// 1 - sRGB.
|
||||||
enum class GammaType {
|
// 2 - TV (BT.709).
|
||||||
SRGB = 1,
|
// 3 - use the power written to *power_ptr.
|
||||||
Unknown = 2,
|
// Anything else - linear.
|
||||||
Linear = 3,
|
// Used in D3D SetGammaRamp/SetPWLGamma to adjust the ramp for the display.
|
||||||
};
|
*type_ptr = uint32_t(FLAGS_kernel_display_gamma_type);
|
||||||
*/
|
*power_ptr = float(FLAGS_kernel_display_gamma_power);
|
||||||
*type_ptr = 1;
|
|
||||||
*unknown_ptr = 2.22222233f; // maybe brightness?
|
|
||||||
}
|
}
|
||||||
DECLARE_XBOXKRNL_EXPORT1(VdGetCurrentDisplayGamma, kVideo, kStub);
|
DECLARE_XBOXKRNL_EXPORT1(VdGetCurrentDisplayGamma, kVideo, kStub);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue