From acc37ba0212b3b84ab945a7c369cc89b779cbc4c Mon Sep 17 00:00:00 2001 From: "fabio.olimpieri" Date: Sun, 12 Aug 2012 16:37:09 +0000 Subject: [PATCH] Added component cable check --- src/emulator.c | 3 ++- src/gui_sdl.c | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/emulator.c b/src/emulator.c index 8235794..7488352 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -362,7 +362,8 @@ int set_video_mode() rmode = VIDEO_GetPreferredMode(NULL); - if ((rmode->viTVMode)!=VI_TVMODE_PAL_INT) return -1; + if (!VIDEO_HaveComponentCable()) return 1; + if ((rmode->viTVMode)!=VI_TVMODE_PAL_INT) return 2; switch(ordenador.progressive) { diff --git a/src/gui_sdl.c b/src/gui_sdl.c index 48492cf..1221999 100644 --- a/src/gui_sdl.c +++ b/src/gui_sdl.c @@ -578,10 +578,16 @@ static void screen_settings(void) } if (submenus[3] != submenus_old[3]) { - if (set_video_mode()) + switch (set_video_mode()) { + case 1: + msgInfo("Necessary component cable",3000,NULL); + ordenador.progressive = 0; + break; + case 2: msgInfo("Only avalaible from 576i PAL",3000,NULL); ordenador.progressive = 0; + break; } } }