From eabd24d852c86fa5e90a6da8cd6685fee455d36a Mon Sep 17 00:00:00 2001 From: twilen Date: Wed, 3 Jul 2013 19:00:02 +0000 Subject: [PATCH] Use PAL or NTSC nominal size values if we don't have any RTG modes. Program calling OpenScreen() with height == STDSCREENHEIGHT without RTG board should open normal PAL/NTSC 256/200 pixels tall non-interlaced screen, not 512 pixels tall interlaced screen. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@47626 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- rom/graphics/bestmodeida.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/rom/graphics/bestmodeida.c b/rom/graphics/bestmodeida.c index 14ec8b4fbc..6a70322ab3 100644 --- a/rom/graphics/bestmodeida.c +++ b/rom/graphics/bestmodeida.c @@ -165,6 +165,22 @@ static BOOL FindBestModeIDForMonitor(struct monitor_driverdata *monitor, struct return args->found_id != INVALID_ID; } +#ifdef __mc68000 +static void FillNominal(struct GfxBase *GfxBase, struct MatchData *args) +{ + struct monitor_driverdata *mdd; + /* Detect if we have RTG modes or only chipset modes. + * How to do this properly? + */ + for (mdd = CDD(GfxBase)->monitors; mdd; mdd = mdd->next) { + if (mdd->id & mdd->mask) /* Chipset = monitor ID zero */ + return; + } + /* Chipset only: set PAL/NTSC defaults */ + args->nominal_width = GfxBase->NormalDisplayColumns; + args->nominal_height = GfxBase->NormalDisplayRows; +} +#endif /***************************************************************************** @@ -256,6 +272,9 @@ static BOOL FindBestModeIDForMonitor(struct monitor_driverdata *monitor, struct /* Obtain default monitor driver */ monitor = MonitorFromSpec(GfxBase->default_monitor, GfxBase); +#ifdef __mc68000 + FillNominal(GfxBase, &args); +#endif /* Get defaults which can be overriden */ while ((tag = NextTagItem(&tstate))) -- 2.11.4.GIT