Debug message expanded to handle vga

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am

Debug message expanded to handle vga

Post by Chilly Willy » Fri Jul 15, 2016 2:00 pm

In vid_set_mode_ex(), you have a debug message:

Code: Select all

    dbglog(DBG_INFO, "vid_set_mode: %ix%i%s %s%s\n", mode->width, mode->height,
           (mode->flags & VID_INTERLACE) ? "IL" : "",
           (mode->flags & VID_PAL) ? "PAL" : "NTSC",
           (mode->generic & DM_MULTIBUFFER) ? " multi-buffered" : "");
This prints the wrong mode if you're using VGA - you'll always get NTSC printed. It should be like this:

Code: Select all

    dbglog(DBG_INFO, "vid_set_mode: %ix%i%s %s%s\n", mode->width, mode->height,
           (mode->flags & VID_INTERLACE) ? "IL" : "",
           (mode->cable_type == CT_VGA) ? "VGA" : (mode->flags & VID_PAL) ? "PAL" : "NTSC",
           (mode->generic & DM_MULTIBUFFER) ? " multi-buffered" : "");
It's fine for CT_RGB since that's SCART, and SCART is always PAL or NTSC, just using the RGB lines instead of composite.
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7481
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Contact:

Re: Debug message expanded to handle vga

Post by Quzar » Mon Dec 24, 2018 8:06 pm

Decided to dig through old forum posts for KOS updates. This has been added to git revision 50f96e5.
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
Post Reply