Skip to content

Commit 830375c

Browse files
authored
Fix direct_video=2 for HPD events (MiSTer-devel#1200)
1 parent dc49256 commit 830375c

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

video.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,10 +2526,17 @@ static int should_auto_enable_direct_video()
25262526
return 0;
25272527
}
25282528

2529-
static void video_mode_load()
2529+
static void video_mode_load(bool keep_direct_video_auto = false)
25302530
{
2531+
static bool direct_video_auto = false;
2532+
2533+
if (cfg.direct_video == 2)
2534+
direct_video_auto = true;
2535+
else if (!keep_direct_video_auto)
2536+
direct_video_auto = false;
2537+
25312538
// Auto-detect and enable direct video if configured
2532-
if (cfg.direct_video == 2) {
2539+
if (direct_video_auto) {
25332540
if (should_auto_enable_direct_video()) {
25342541
printf("Auto-enabling direct video for known DAC.\n");
25352542
// Enable direct video, preserve all other user settings
@@ -2645,7 +2652,7 @@ void video_reinit()
26452652
hdmi_config_set_hdr();
26462653

26472654
support_FHD = 0;
2648-
video_mode_load();
2655+
video_mode_load(true);
26492656

26502657
video_cfg_init();
26512658
video_set_mode(&v_def, 0);

0 commit comments

Comments
 (0)