Add video_off timeout in MiSTer.ini

This commit is contained in:
Sorgelig
2022-08-04 02:43:58 +08:00
parent 38d8519711
commit 3192baa0f3
5 changed files with 59 additions and 45 deletions

View File

@@ -423,7 +423,7 @@ static bool read_video_filter(int type, VideoFilter *out)
out->is_adaptive = false;
valid = scale_phases(out->phases, phases, count);
}
if (!valid)
{
// Make a default NN filter in case of error
@@ -2389,7 +2389,7 @@ void video_mode_adjust()
}
else if (cfg_has_video_sections()) // if we have video sections but aren't updating the resolution for other reasons, then do it here
{
video_set_mode(&v_def, 0);
video_set_mode(&v_def, 0);
user_io_send_buttons(1);
force = true;
}
@@ -2892,54 +2892,57 @@ void video_menu_bg(int n, int idle)
draw_black();
switch (n)
if (idle < 3)
{
case 1:
if (!menubg) menubg = load_bg();
if (menubg)
switch (n)
{
imlib_context_set_image(menubg);
int src_w = imlib_image_get_width();
int src_h = imlib_image_get_height();
//printf("menubg: src_w=%d, src_h=%d\n", src_w, src_h);
case 1:
if (!menubg) menubg = load_bg();
if (menubg)
{
imlib_context_set_image(menubg);
int src_w = imlib_image_get_width();
int src_h = imlib_image_get_height();
//printf("menubg: src_w=%d, src_h=%d\n", src_w, src_h);
if (*bg)
{
imlib_context_set_image(*bg);
imlib_blend_image_onto_image(menubg, 0,
0, 0, //int source_x, int source_y,
src_w, src_h, //int source_width, int source_height,
brd_x, brd_y, //int destination_x, int destination_y,
fb_width - (brd_x * 2), fb_height - (brd_y * 2) //int destination_width, int destination_height
);
bg_has_picture = 1;
break;
}
else
{
printf("*bg = 0!\n");
if (*bg)
{
imlib_context_set_image(*bg);
imlib_blend_image_onto_image(menubg, 0,
0, 0, //int source_x, int source_y,
src_w, src_h, //int source_width, int source_height,
brd_x, brd_y, //int destination_x, int destination_y,
fb_width - (brd_x * 2), fb_height - (brd_y * 2) //int destination_width, int destination_height
);
bg_has_picture = 1;
break;
}
else
{
printf("*bg = 0!\n");
}
}
draw_checkers();
break;
case 2:
draw_hbars1();
break;
case 3:
draw_hbars2();
break;
case 4:
draw_vbars1();
break;
case 5:
draw_vbars2();
break;
case 6:
draw_spectrum();
break;
case 7:
draw_black();
break;
}
draw_checkers();
break;
case 2:
draw_hbars1();
break;
case 3:
draw_hbars2();
break;
case 4:
draw_vbars1();
break;
case 5:
draw_vbars2();
break;
case 6:
draw_spectrum();
break;
case 7:
draw_black();
break;
}
if (cfg.logo && logo && !idle)