<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>VIDEO_GetPreferredMode...again</title>
<description> Help - with the latest libs, anyone know if we still need to tweak the results from VIDEO_GetPreferredMode to get the most from the visible display.

I&amp;#039;m thinking the latest lib now has TVPal576IntDfScale, so this code bellow may now be outdated.
I.e. I used to do something like this, but I&amp;#039;ve just refresh to the latest libs and found this may now break things.


GXRModeObj* WiiManager::GetBestVideoMode()
{
GXRModeObj* vmode = VIDEO_GetPreferredMode(NULL); // get default video mode

bool pal = false;

if (vmode == &amp;TVPal528IntDf) // this may now be stupid, since I&amp;#039;ve just found something that will compile for the moment!
{
pal = true;
vmode = &amp;TVPal576IntDfScale; //&amp;TVPal574IntDfScale; ....574 removed fro libs, Ive just used the new 576
}

if (CONF_GetAspectRatio() == CONF_ASPECT_16_9)
{
vmode-&amp;gt;viWidth = 678; // probably top limit for stretching the display onto your TV
}
//else
//{
// vmode-&amp;gt;viWidth = 672; // not tested...this may work ok
//}


if (pal)
{
vmode-&amp;gt;viXOrigin = (VI_MAX_WIDTH_PAL - vmode-&amp;gt;viWidth) / 2;
vmode-&amp;gt;viYOrigin = (VI_MAX_HEIGHT_PAL - vmode-&amp;gt;viHeight) / 2;
}
else
{
vmode-&amp;gt;viXOrigin = (VI_MAX_WIDTH_NTSC - vmode-&amp;gt;viWidth) / 2;
vmode-&amp;gt;viYOrigin = (VI_MAX_HEIGHT_NTSC - vmode-&amp;gt;viHeight) / 2;
}

s8 hoffset = 0;

if (CONF_GetDisplayOffsetH(&amp;hoffset) == 0)
vmode-&amp;gt;viXOrigin += hoffset;

return vmode;
}</description><link>http://forum.wiibrew.org/read.php?11,70694,70694#msg-70694</link><lastBuildDate>Thu, 12 Mar 2026 20:45:07 +0100</lastBuildDate>
<generator>Phorum 5.2.23</generator>
<item>
<guid>http://forum.wiibrew.org/read.php?11,70694,70768#msg-70768</guid>
<title>Re: VIDEO_GetPreferredMode...again</title><link>http://forum.wiibrew.org/read.php?11,70694,70768#msg-70768</link><description><![CDATA[ Component cable plugged into a Samsung HD 1080p, does look nice! (so no real need for tv settings, wii settings are on HDTV 480p / wide)<br />(In the past I did use 678 on CRT TV with good results, via scart RGB)<br /><br />Owen, what results do you get with the new code above (better with or without for <u>left/right borders only</u>)?<br />One quick way to test your display is to add 4 extra wii screen pointers relative to the original (centre) pointer.<br />i.e. hack in 4 extra wiimote pointers at these (x,y) coords<br />-320,-240<br />+320,-240<br />-320,+240<br />+320,+240<br /><br />If you can&#039;t see a 1/4 of each pointer when the original one is centered your screen is stretch too far.<br /><br />I&#039;m just trying to address the width, the libs defaults for height look over generous, I lose allot from the top/bottom of the screen. But I use the 5% rule about not displaying important text in that edge area.]]></description>
<dc:creator>Titmouse</dc:creator>
<category>Coding</category><pubDate>Mon, 25 Jun 2012 21:15:05 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,70694,70766#msg-70766</guid>
<title>Re: VIDEO_GetPreferredMode...again</title><link>http://forum.wiibrew.org/read.php?11,70694,70766#msg-70766</link><description><![CDATA[ So you are using a 16:9 widescreen tv and what cables and tv settings are you using?]]></description>
<dc:creator>owen</dc:creator>
<category>Coding</category><pubDate>Mon, 25 Jun 2012 20:21:37 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,70694,70765#msg-70765</guid>
<title>Re: VIDEO_GetPreferredMode...again</title><link>http://forum.wiibrew.org/read.php?11,70694,70765#msg-70765</link><description><![CDATA[ Using this example now (stops the left/right border showing a dead space by stretching)<br />678 is a tried and tested value, works well for me as a starting default.<br /><br /><pre class="bbcode">
GXRModeObj* WiiManager::GetBestVideoMode()
{
	GXRModeObj* vmode = VIDEO_GetPreferredMode(NULL); // get default video mode
	if (CONF_GetAspectRatio() == CONF_ASPECT_16_9)
	{
		vmode-&gt;viWidth = 678;
		vmode-&gt;viXOrigin = (VI_MAX_WIDTH_NTSC - 678)/2;
	}
	return vmode;
}
</pre>]]></description>
<dc:creator>Titmouse</dc:creator>
<category>Coding</category><pubDate>Mon, 25 Jun 2012 19:59:23 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,70694,70698#msg-70698</guid>
<title>Re: VIDEO_GetPreferredMode...again</title><link>http://forum.wiibrew.org/read.php?11,70694,70698#msg-70698</link><description><![CDATA[ You can remove the "if (vmode == &TVPal528IntDf)" section, since that mode is no longer returned as a preferred mode (the scaled mode is used instead).<br /><br />The 576 line modes have some issues, I strongly advise not to manually adjust the vi settings at all if they are going to be used. Although according to the libogc devs it&#039;s either all in my head or only my wiis that have this problem... even though the official SDK states that only up to 574 lines are supported. If there was no problem with 576 lines you would think Nintendo would have supported it...]]></description>
<dc:creator>tueidj</dc:creator>
<category>Coding</category><pubDate>Sun, 10 Jun 2012 23:42:25 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,70694,70697#msg-70697</guid>
<title>Re: VIDEO_GetPreferredMode...again</title><link>http://forum.wiibrew.org/read.php?11,70694,70697#msg-70697</link><description><![CDATA[ After posting I&#039;ve looked at the libs source, noticed my code could do odd things since VIDEO_GetPreferredMode can return these;<br /><br />Component Cable: TVNtsc480Prog,TVEurgb60Hz480Prog,TVPal576ProgScale,TVMpal480Prog<br />Without Component Cable: TVNtsc480IntDf,TVEurgb60Hz480IntDf,TVPal576IntDfScale,TVMpal480IntDf<br /><br /><br />Think I&#039;ll run some tests with a edge border test graphic to see if at least 5% of the edge can be seen.<br />I&#039;ll test in <u>all</u> display modes with and without component cable, on flat screen and old style TV.<br /><br /><br />Will post the results here at some point - If anyones already done this please let me know.]]></description>
<dc:creator>Titmouse</dc:creator>
<category>Coding</category><pubDate>Sun, 10 Jun 2012 22:19:31 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,70694,70695#msg-70695</guid>
<title>Re: VIDEO_GetPreferredMode...again</title><link>http://forum.wiibrew.org/read.php?11,70694,70695#msg-70695</link><description><![CDATA[ people have been asking this question for YEARS!!! I never really understood it.]]></description>
<dc:creator>owen</dc:creator>
<category>Coding</category><pubDate>Sun, 10 Jun 2012 20:04:22 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,70694,70694#msg-70694</guid>
<title>VIDEO_GetPreferredMode...again</title><link>http://forum.wiibrew.org/read.php?11,70694,70694#msg-70694</link><description><![CDATA[ Help - with the latest libs, anyone know if we still need to tweak the results from <b>VIDEO_GetPreferredMode</b> to get the most from the visible display.<br /><br />I&#039;m thinking the latest lib now has TVPal576IntDfScale, so this code bellow may now be outdated.<br />I.e. I used to do something like this, but I&#039;ve just refresh to the latest libs and found this may now break things.<br /><br /><pre class="bbcode">
<s>GXRModeObj* WiiManager::GetBestVideoMode()
{
	GXRModeObj* vmode = VIDEO_GetPreferredMode(NULL); // get default video mode

	bool pal = false;

	if (vmode == &TVPal528IntDf)  // this may now be stupid, since I&#039;ve just found something that will compile for the moment!
	{
		pal = true;
		vmode = &TVPal576IntDfScale; //&TVPal574IntDfScale;  ....574 removed fro libs, Ive just used the new 576
	}

	if (CONF_GetAspectRatio() == CONF_ASPECT_16_9)
	{
	      vmode-&gt;viWidth = 678;  // probably top limit for stretching the display onto your TV
	}
	//else
	//{
	//		vmode-&gt;viWidth = 672;  // not tested...this may work ok
	//}


	if (pal)
	{
		vmode-&gt;viXOrigin = (VI_MAX_WIDTH_PAL - vmode-&gt;viWidth) / 2;
		vmode-&gt;viYOrigin = (VI_MAX_HEIGHT_PAL - vmode-&gt;viHeight) / 2;
	}
	else
	{
		vmode-&gt;viXOrigin = (VI_MAX_WIDTH_NTSC - vmode-&gt;viWidth) / 2;
		vmode-&gt;viYOrigin = (VI_MAX_HEIGHT_NTSC - vmode-&gt;viHeight) / 2;
	}

	s8 hoffset = 0;

	if (CONF_GetDisplayOffsetH(&hoffset) == 0)
		vmode-&gt;viXOrigin += hoffset;

	return vmode;
}</s></pre>]]></description>
<dc:creator>Titmouse</dc:creator>
<category>Coding</category><pubDate>Sun, 10 Jun 2012 18:08:18 +0200</pubDate></item>
</channel>
</rss>