video: make HDMI game mode optional.
This commit is contained in:
@@ -214,3 +214,7 @@ bt_reset_before_pair=0
|
||||
; Wheel steering angle range. Supported ranges depends on specific wheel model
|
||||
; If not set then default (depending on driver) range is used
|
||||
;wheel_range=200
|
||||
|
||||
; Enable game mode on HDMI output. It may give you better optimization on some displays, but also
|
||||
; can give worse result on others. Default is 0 (non-game).
|
||||
;hdmi_game_mode=1
|
||||
|
||||
1
cfg.cpp
1
cfg.cpp
@@ -95,6 +95,7 @@ static const ini_var_t ini_vars[] =
|
||||
{ "RUMBLE", (void *)(&(cfg.rumble)), UINT8, 0, 1},
|
||||
{ "WHEEL_FORCE", (void*)(&(cfg.wheel_force)), UINT8, 0, 100 },
|
||||
{ "WHEEL_RANGE", (void*)(&(cfg.wheel_range)), UINT16, 0, 1000 },
|
||||
{ "HDMI_GAME_MODE", (void *)(&(cfg.hdmi_game_mode)), UINT8, 0, 1},
|
||||
};
|
||||
|
||||
static const int nvars = (int)(sizeof(ini_vars) / sizeof(ini_var_t));
|
||||
|
||||
1
cfg.h
1
cfg.h
@@ -72,6 +72,7 @@ typedef struct {
|
||||
uint8_t rumble;
|
||||
uint8_t wheel_force;
|
||||
uint16_t wheel_range;
|
||||
uint8_t hdmi_game_mode;
|
||||
} cfg_t;
|
||||
|
||||
extern cfg_t cfg;
|
||||
|
||||
@@ -972,7 +972,7 @@ static void hdmi_config()
|
||||
0x56, 0b00001000, // [5:4] Picture Aspect Ratio
|
||||
// [3:0] Active Portion Aspect Ratio b1000 = Same as Picture Aspect Ratio
|
||||
|
||||
0x57, (uint8_t)(0b10000000 // [7] IT Content. 0 - No. 1 - Yes (type set in register 0x59).
|
||||
0x57, (uint8_t)((cfg.hdmi_game_mode ? 0x80 : 0x00) // [7] IT Content. 0 - No. 1 - Yes (type set in register 0x59).
|
||||
// [6:4] Color space (ignored for RGB)
|
||||
| ((ypbpr || cfg.hdmi_limited) ? 0b0100 : 0b1000)), // [3:2] RGB Quantization range
|
||||
// [1:0] Non-Uniform Scaled: 00 - None. 01 - Horiz. 10 - Vert. 11 - Both.
|
||||
|
||||
Reference in New Issue
Block a user