On our way to 2.1, huh?

git-svn-id: svn://localhost/Users/andi/Downloads/code/trunk@13 eddbe33b-e435-4246-ac25-f5eb65f9a13c
This commit is contained in:
leathl 2009-12-28 21:24:21 +00:00
parent 13608e1f94
commit 56cac8cbc8
9 changed files with 168 additions and 38 deletions

View File

@ -27,7 +27,7 @@
<UpdateRequired>false</UpdateRequired> <UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions> <MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision> <ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>2.0.0.%2a</ApplicationVersion> <ApplicationVersion>2.1.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>

View File

@ -25,6 +25,8 @@ namespace CustomizeMii
{ {
partial class CustomizeMii_Main partial class CustomizeMii_Main
{ {
public int sendWadReady = 0;
private bool sendToWii = false;
private bool internalSound; private bool internalSound;
void bwBannerReplace_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) void bwBannerReplace_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
@ -542,6 +544,9 @@ namespace CustomizeMii
EventHandler DisableControls = new EventHandler(this.DisableControls); EventHandler DisableControls = new EventHandler(this.DisableControls);
this.Invoke(DisableControls); this.Invoke(DisableControls);
this.sendToWii = wadInfo.sendToWii;
sendWadReady = 0;
bwCreateWad.ReportProgress(0, "Making TPLs transparent"); bwCreateWad.ReportProgress(0, "Making TPLs transparent");
MakeBannerTplsTransparent(); MakeBannerTplsTransparent();
MakeIconTplsTransparent(); MakeIconTplsTransparent();
@ -725,13 +730,19 @@ namespace CustomizeMii
bwCreateWad.ReportProgress(100, " "); bwCreateWad.ReportProgress(100, " ");
CreationTimer.Stop(); CreationTimer.Stop();
FileInfo fi = new FileInfo(wadInfo.outFile); if (!sendToWii)
double fileSize = Math.Round(fi.Length * 0.0009765625 * 0.0009765625, 2); {
FileInfo fi = new FileInfo(wadInfo.outFile);
double fileSize = Math.Round(fi.Length * 0.0009765625 * 0.0009765625, 2);
InfoBox(string.Format("Successfully created custom channel!\nTime elapsed: {0} ms\nFilesize: {1} MB\nApprox. Blocks: {2}", CreationTimer.ElapsedMilliseconds, fileSize, Wii.WadInfo.GetNandBlocks(wadInfo.outFile)));
InfoBox(string.Format("Successfully created custom channel!\nTime elapsed: {0} ms\nFilesize: {1} MB\nApprox. Blocks: {2}", CreationTimer.ElapsedMilliseconds, fileSize, Wii.WadInfo.GetNandBlocks(wadInfo.outFile)));
}
else sendWadReady = 1;
} }
catch (Exception ex) catch (Exception ex)
{ {
sendWadReady = -1;
CreationTimer.Stop(); CreationTimer.Stop();
EventHandler EnableControls = new EventHandler(this.EnableControls); EventHandler EnableControls = new EventHandler(this.EnableControls);
this.Invoke(EnableControls); this.Invoke(EnableControls);

View File

@ -167,6 +167,7 @@ namespace CustomizeMii
this.cmDol = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmDol = new System.Windows.Forms.ContextMenuStrip(this.components);
this.cmLoadDol = new System.Windows.Forms.ToolStripMenuItem(); this.cmLoadDol = new System.Windows.Forms.ToolStripMenuItem();
this.cmDolFromSource = new System.Windows.Forms.ToolStripMenuItem(); this.cmDolFromSource = new System.Windows.Forms.ToolStripMenuItem();
this.panCredits = new System.Windows.Forms.Panel();
this.tabControl.SuspendLayout(); this.tabControl.SuspendLayout();
this.tabSource.SuspendLayout(); this.tabSource.SuspendLayout();
this.tabTitle.SuspendLayout(); this.tabTitle.SuspendLayout();
@ -182,6 +183,7 @@ namespace CustomizeMii
this.cmOptionsExtract.SuspendLayout(); this.cmOptionsExtract.SuspendLayout();
this.cmSound.SuspendLayout(); this.cmSound.SuspendLayout();
this.cmDol.SuspendLayout(); this.cmDol.SuspendLayout();
this.panCredits.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// btnCreateWad // btnCreateWad
@ -1186,9 +1188,9 @@ namespace CustomizeMii
// //
// tabCredits // tabCredits
// //
this.tabCredits.Controls.Add(this.panCredits);
this.tabCredits.Controls.Add(this.llbUpdateAvailabe); this.tabCredits.Controls.Add(this.llbUpdateAvailabe);
this.tabCredits.Controls.Add(this.llbSite); this.tabCredits.Controls.Add(this.llbSite);
this.tabCredits.Controls.Add(this.lbCreditThanks);
this.tabCredits.Controls.Add(this.lbCreditVersion); this.tabCredits.Controls.Add(this.lbCreditVersion);
this.tabCredits.Controls.Add(this.lbCreditInfo); this.tabCredits.Controls.Add(this.lbCreditInfo);
this.tabCredits.Location = new System.Drawing.Point(4, 22); this.tabCredits.Location = new System.Drawing.Point(4, 22);
@ -1225,9 +1227,9 @@ namespace CustomizeMii
// //
// lbCreditThanks // lbCreditThanks
// //
this.lbCreditThanks.Location = new System.Drawing.Point(0, 91); this.lbCreditThanks.Location = new System.Drawing.Point(8, 0);
this.lbCreditThanks.Name = "lbCreditThanks"; this.lbCreditThanks.Name = "lbCreditThanks";
this.lbCreditThanks.Size = new System.Drawing.Size(443, 79); this.lbCreditThanks.Size = new System.Drawing.Size(427, 150);
this.lbCreditThanks.TabIndex = 2; this.lbCreditThanks.TabIndex = 2;
this.lbCreditThanks.Text = resources.GetString("lbCreditThanks.Text"); this.lbCreditThanks.Text = resources.GetString("lbCreditThanks.Text");
this.lbCreditThanks.TextAlign = System.Drawing.ContentAlignment.TopCenter; this.lbCreditThanks.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@ -1429,6 +1431,15 @@ namespace CustomizeMii
this.cmDolFromSource.Text = "Take From Source WAD"; this.cmDolFromSource.Text = "Take From Source WAD";
this.cmDolFromSource.Click += new System.EventHandler(this.cmDolFromSource_Click); this.cmDolFromSource.Click += new System.EventHandler(this.cmDolFromSource_Click);
// //
// panCredits
//
this.panCredits.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panCredits.Controls.Add(this.lbCreditThanks);
this.panCredits.Location = new System.Drawing.Point(0, 94);
this.panCredits.Name = "panCredits";
this.panCredits.Size = new System.Drawing.Size(443, 79);
this.panCredits.TabIndex = 5;
//
// CustomizeMii_Main // CustomizeMii_Main
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1467,6 +1478,7 @@ namespace CustomizeMii
this.cmOptionsExtract.ResumeLayout(false); this.cmOptionsExtract.ResumeLayout(false);
this.cmSound.ResumeLayout(false); this.cmSound.ResumeLayout(false);
this.cmDol.ResumeLayout(false); this.cmDol.ResumeLayout(false);
this.panCredits.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -1594,6 +1606,7 @@ namespace CustomizeMii
private System.Windows.Forms.ContextMenuStrip cmDol; private System.Windows.Forms.ContextMenuStrip cmDol;
private System.Windows.Forms.ToolStripMenuItem cmLoadDol; private System.Windows.Forms.ToolStripMenuItem cmLoadDol;
private System.Windows.Forms.ToolStripMenuItem cmDolFromSource; private System.Windows.Forms.ToolStripMenuItem cmDolFromSource;
private System.Windows.Forms.Panel panCredits;
} }
} }

View File

@ -36,10 +36,11 @@ namespace CustomizeMii
{ {
public partial class CustomizeMii_Main : Form public partial class CustomizeMii_Main : Form
{ {
const string version = "2.0"; //Hint for myself: Never use a char in the Version (UpdateCheck)! const string version = "2.1"; //Hint for myself: Never use a char in the Version (UpdateCheck)!
const int SoundMaxLength = 30; //In seconds const int SoundMaxLength = 30; //In seconds
const int SoundWarningLength = 20; //In seconds const int SoundWarningLength = 20; //In seconds
const int BnsWarningLength = 45; //In seconds const int BnsWarningLength = 45; //In seconds
const int CreditsScrollSpeed = 85; //Timer Intervall for the scrolling Credits
public static string TempPath = Path.GetTempPath() + "CustomizeMii_Temp\\XXX\\"; public static string TempPath = Path.GetTempPath() + "CustomizeMii_Temp\\XXX\\";
public static string TempWadPath = Path.GetTempPath() + "CustomizeMii_Temp\\XXX\\TempWad.wad"; public static string TempWadPath = Path.GetTempPath() + "CustomizeMii_Temp\\XXX\\TempWad.wad";
public static string TempUnpackPath = Path.GetTempPath() + "CustomizeMii_Temp\\XXX\\Unpack\\"; public static string TempUnpackPath = Path.GetTempPath() + "CustomizeMii_Temp\\XXX\\Unpack\\";
@ -82,6 +83,8 @@ namespace CustomizeMii
private Forwarder.Complex ComplexForwarder = new Forwarder.Complex(); private Forwarder.Complex ComplexForwarder = new Forwarder.Complex();
private delegate void BoxInvoker(string message); private delegate void BoxInvoker(string message);
private delegate void SetTextInvoker(string text, TextBox tb); private delegate void SetTextInvoker(string text, TextBox tb);
double separatorBtn;
Timer tmrCredits = new Timer();
public CustomizeMii_Main() public CustomizeMii_Main()
{ {
@ -111,7 +114,10 @@ namespace CustomizeMii
private void CustomizeMii_Main_FormClosing(object sender, FormClosingEventArgs e) private void CustomizeMii_Main_FormClosing(object sender, FormClosingEventArgs e)
{ {
try { if (Directory.Exists(TempPath)) Directory.Delete(TempPath, true); } try {
if (Directory.Exists(TempPath)) Directory.Delete(TempPath, true);
if (File.Exists("C:\\cmtempmp3wav.wav")) File.Delete("C:\\cmtempmp3wav.wav");
}
catch { } catch { }
Environment.Exit(0); Environment.Exit(0);
} }
@ -157,6 +163,8 @@ namespace CustomizeMii
btnBrowseSound.Text = "Browse..."; btnBrowseSound.Text = "Browse...";
rtbInstructions.Rtf = Properties.Resources.Instructions; rtbInstructions.Rtf = Properties.Resources.Instructions;
rtbInstructions.LinkClicked += new LinkClickedEventHandler(rtbInstructions_LinkClicked); rtbInstructions.LinkClicked += new LinkClickedEventHandler(rtbInstructions_LinkClicked);
tmrCredits.Interval = CreditsScrollSpeed;
tmrCredits.Tick += new EventHandler(tmrCredits_Tick);
#if !Debug #if !Debug
DisableControls(null, null); DisableControls(null, null);
@ -254,7 +262,7 @@ namespace CustomizeMii
private void SetToolTips() private void SetToolTips()
{ {
ToolTip TTip = new ToolTip(); ToolTip TTip = new ToolTip();
TTip.SetToolTip(btnCreateWad, "Create WAD..."); TTip.SetToolTip(btnCreateWad, "Save WAD or send it directly to the Wii...");
TTip.SetToolTip(btnBrowseSource, "Browse for a WAD that is used as a Base..."); TTip.SetToolTip(btnBrowseSource, "Browse for a WAD that is used as a Base...");
TTip.SetToolTip(btnLoadBaseWad, "Load the selected Base WAD..."); TTip.SetToolTip(btnLoadBaseWad, "Load the selected Base WAD...");
TTip.SetToolTip(btnPreviewBaseWad, "Preview the selected Base WAD, a Browserwindow will be opened..."); TTip.SetToolTip(btnPreviewBaseWad, "Preview the selected Base WAD, a Browserwindow will be opened...");
@ -336,14 +344,34 @@ namespace CustomizeMii
private void SetButtonText() private void SetButtonText()
{ {
Random Randomizer = new Random(); //Random Randomizer = new Random();
btnCreateWad.Text = ButtonTexts[Randomizer.Next(0, ButtonTexts.Length - 1)]; //btnCreateWad.Text = ButtonTexts[Randomizer.Next(0, ButtonTexts.Length - 1)];
if (btnCreateWad.Text == "Image") //if (btnCreateWad.Text == "Image")
{ //{
btnCreateWad.Text = string.Empty; // btnCreateWad.Text = string.Empty;
btnCreateWad.Image = Properties.Resources.btnCreateWad; // btnCreateWad.Image = Properties.Resources.btnCreateWad;
} //}
btnCreateWad.Text = string.Empty;
Image tmpImg = new Bitmap(btnCreateWad.Width, btnCreateWad.Height);
Graphics gImg = Graphics.FromImage(tmpImg);
gImg.Clear(Color.Transparent);
separatorBtn = btnCreateWad.Width * 0.5;
gImg.DrawLine(Pens.Gray, new Point((int)separatorBtn, 0), new Point((int)separatorBtn, btnCreateWad.Height));
string sSend = "Send";
string sSave = "Save";
gImg.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;
gImg.DrawString(sSend, btnCreateWad.Font, Brushes.Black, new PointF(95, 10));
gImg.DrawString(sSave, btnCreateWad.Font, Brushes.Black, new PointF(320, 10));
btnCreateWad.Image = tmpImg;
} }
private void ErrorBox(string message) private void ErrorBox(string message)
@ -662,6 +690,8 @@ namespace CustomizeMii
private void tabControl_Selecting(object sender, TabControlCancelEventArgs e) private void tabControl_Selecting(object sender, TabControlCancelEventArgs e)
{ {
tmrCredits.Stop();
if (tabControl.SelectedTab == tabBanner) if (tabControl.SelectedTab == tabBanner)
{ {
lbxBannerTpls.SelectedIndex = -1; lbxBannerTpls.SelectedIndex = -1;
@ -684,6 +714,17 @@ namespace CustomizeMii
{ {
AddBrlans(null, null); AddBrlans(null, null);
} }
else if (tabControl.SelectedTab == tabCredits)
{
lbCreditThanks.Location = new Point(lbCreditThanks.Location.X, panCredits.Height);
tmrCredits.Start();
}
}
void tmrCredits_Tick(object sender, EventArgs e)
{
if (lbCreditThanks.Location.Y == -130) lbCreditThanks.Location = new Point(lbCreditThanks.Location.X, panCredits.Height);
lbCreditThanks.Location = new Point(lbCreditThanks.Location.X, lbCreditThanks.Location.Y - 1);
} }
private void lbStatusText_TextChanged(object sender, EventArgs e) private void lbStatusText_TextChanged(object sender, EventArgs e)
@ -2187,30 +2228,22 @@ namespace CustomizeMii
private void btnCreateWad_Click(object sender, EventArgs e) private void btnCreateWad_Click(object sender, EventArgs e)
{ {
if (pbProgress.Value == 100) Point mousePos = MousePosition;
if (mousePos.X < (this.Location.X + btnCreateWad.Location.X + Math.Ceiling(separatorBtn) + 3))
{ {
if (!string.IsNullOrEmpty(tbSourceWad.Text)) if (pbProgress.Value == 100)
{ {
if (cbFailureChecks.Checked == true || FailureCheck() == true) if (!string.IsNullOrEmpty(tbSourceWad.Text))
{ {
SaveFileDialog sfd = new SaveFileDialog(); if (cbFailureChecks.Checked == true || FailureCheck() == true)
sfd.Filter = "Wii Channels|*.wad";
if (!string.IsNullOrEmpty(tbAllLanguages.Text))
sfd.FileName = tbAllLanguages.Text + " - " + tbTitleID.Text.ToUpper() + ".wad";
else
sfd.FileName = tbEnglish.Text + " - " + tbTitleID.Text.ToUpper() + ".wad";
if (sfd.ShowDialog() == DialogResult.OK)
{ {
try try
{ {
CreationTimer.Reset();
CreationTimer.Start();
WadCreationInfo wadInfo = new WadCreationInfo(); WadCreationInfo wadInfo = new WadCreationInfo();
wadInfo.outFile = sfd.FileName; wadInfo.outFile = TempPath + "SendToWii.wad";
wadInfo.nandLoader = (WadCreationInfo.NandLoader)cmbNandLoader.SelectedIndex; wadInfo.nandLoader = (WadCreationInfo.NandLoader)cmbNandLoader.SelectedIndex;
wadInfo.sendToWii = true;
BackgroundWorker bwCreateWad = new BackgroundWorker(); BackgroundWorker bwCreateWad = new BackgroundWorker();
bwCreateWad.DoWork += new DoWorkEventHandler(bwCreateWad_DoWork); bwCreateWad.DoWork += new DoWorkEventHandler(bwCreateWad_DoWork);
@ -2218,16 +2251,65 @@ namespace CustomizeMii
bwCreateWad.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bwCreateWad_RunWorkerCompleted); bwCreateWad.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bwCreateWad_RunWorkerCompleted);
bwCreateWad.WorkerReportsProgress = true; bwCreateWad.WorkerReportsProgress = true;
bwCreateWad.RunWorkerAsync(wadInfo); bwCreateWad.RunWorkerAsync(wadInfo);
// @WiiCrazy: The WAD will be saved to >> TempTempPath + "SendToWii.wad" <<
// here. Now a loop that waits for the BackgroundWorker to finish and then opens
// a new window (wiiload - window or whatever) ?!
// If it finishes successfully, the variable >> sendWadReady << will turn into 1,
// if it errors, it will turn into -1, as long as it's running it is 0.
} }
catch (Exception ex) catch (Exception ex)
{ {
CreationTimer.Stop();
ErrorBox(ex.Message); ErrorBox(ex.Message);
} }
} }
} }
} }
} }
else
{
if (pbProgress.Value == 100)
{
if (!string.IsNullOrEmpty(tbSourceWad.Text))
{
if (cbFailureChecks.Checked == true || FailureCheck() == true)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "Wii Channels|*.wad";
if (!string.IsNullOrEmpty(tbAllLanguages.Text))
sfd.FileName = tbAllLanguages.Text + " - " + tbTitleID.Text.ToUpper() + ".wad";
else
sfd.FileName = tbEnglish.Text + " - " + tbTitleID.Text.ToUpper() + ".wad";
if (sfd.ShowDialog() == DialogResult.OK)
{
try
{
CreationTimer.Reset();
CreationTimer.Start();
WadCreationInfo wadInfo = new WadCreationInfo();
wadInfo.outFile = sfd.FileName;
wadInfo.nandLoader = (WadCreationInfo.NandLoader)cmbNandLoader.SelectedIndex;
BackgroundWorker bwCreateWad = new BackgroundWorker();
bwCreateWad.DoWork += new DoWorkEventHandler(bwCreateWad_DoWork);
bwCreateWad.ProgressChanged += new ProgressChangedEventHandler(bwCreateWad_ProgressChanged);
bwCreateWad.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bwCreateWad_RunWorkerCompleted);
bwCreateWad.WorkerReportsProgress = true;
bwCreateWad.RunWorkerAsync(wadInfo);
}
catch (Exception ex)
{
CreationTimer.Stop();
ErrorBox(ex.Message);
}
}
}
}
}
}
} }
private void lbxBrlytBanner_SelectedIndexChanged(object sender, EventArgs e) private void lbxBrlytBanner_SelectedIndexChanged(object sender, EventArgs e)

View File

@ -123,7 +123,9 @@ Xuzz for his idea and hard work
Xuzz, SquidMan, megazig, Matt_P, Omega and The Lemon Man for Wii.py Xuzz, SquidMan, megazig, Matt_P, Omega and The Lemon Man for Wii.py
SquidMan for Zetsubou SquidMan for Zetsubou
Andre Perrot for gbalzss Andre Perrot for gbalzss
comex and Waninkoko for both their NAND Loader</value> comex and Waninkoko for both their NAND Loader
djdynamite123 for the forwarder base files (ForwardMii-Plugin)
The USB Loader GX Team for their forwarder source (ForwardMii-Plugin)</value>
</data> </data>
<metadata name="ssMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ssMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>16, 7</value> <value>16, 7</value>

View File

@ -1,4 +1,21 @@
namespace CustomizeMii /* This file is part of CustomizeMii
* Copyright (C) 2009 Leathl
*
* CustomizeMii is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CustomizeMii is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace CustomizeMii
{ {
public struct BnsConversionInfo public struct BnsConversionInfo
{ {
@ -25,6 +42,7 @@
public string outFile; public string outFile;
public NandLoader nandLoader; public NandLoader nandLoader;
public bool sendToWii;
} }
public struct Progress public struct Progress

View File

@ -50,6 +50,6 @@ using System.Resources;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben: // übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")] [assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")] [assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: NeutralResourcesLanguageAttribute("en")] [assembly: NeutralResourcesLanguageAttribute("en")]

View File

@ -9,6 +9,9 @@ Thanks to icefire / Xuzz for the basic idea of this Application!
----------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
Changelog: Changelog:
Version 2.1
-
Version 2.0 Version 2.0
- Added BNS conversion (Mono and Stereo, with and without loop) - Added BNS conversion (Mono and Stereo, with and without loop)
- Fixed MP3 conversion (some files didn't convert) - Fixed MP3 conversion (some files didn't convert)

View File

@ -13,6 +13,7 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <math.h> #include <math.h>
#include <ogc/conf.h>
#define DEFAULT_FIFO_SIZE 256 * 1024 #define DEFAULT_FIFO_SIZE 256 * 1024
static unsigned int *xfb[2] = { NULL, NULL }; // Double buffered static unsigned int *xfb[2] = { NULL, NULL }; // Double buffered