future support for video shifting

This commit is contained in:
dborth 2009-01-26 07:11:02 +00:00
parent 48b5562e8d
commit 9e7c13fd8c
4 changed files with 13 additions and 4 deletions

View File

@ -157,6 +157,8 @@ preparePrefsData (int method)
createXMLSetting("ZoomLevel", "Zoom Level", FtoStr(GCSettings.ZoomLevel));
createXMLSetting("render", "Video Filtering", toStr(GCSettings.render));
createXMLSetting("widescreen", "Aspect Ratio Correction", toStr(GCSettings.widescreen));
createXMLSetting("xshift", "Horizontal Video Shift", toStr(GCSettings.xshift));
createXMLSetting("yshift", "Vertical Video Shift", toStr(GCSettings.yshift));
createXMLSection("Controller", "Controller Settings");
@ -316,6 +318,8 @@ decodePrefsData (int method)
loadXMLSetting(&GCSettings.ZoomLevel, "ZoomLevel");
loadXMLSetting(&GCSettings.render, "render");
loadXMLSetting(&GCSettings.widescreen, "widescreen");
loadXMLSetting(&GCSettings.xshift, "xshift");
loadXMLSetting(&GCSettings.yshift, "yshift");
// Controller Settings

View File

@ -56,6 +56,8 @@ struct SGCSettings{
int widescreen;
int render; // 0 - original, 1 - filtered, 2 - unfiltered
int VerifySaves;
int xshift; // video output shift
int yshift;
};
void ExitToLoader();

View File

@ -46,4 +46,7 @@ DefaultSettings ()
GCSettings.ZoomLevel = 1.0; // zoom level
GCSettings.render = 1; // Filtered
GCSettings.widescreen = 0; // no aspect ratio correction
GCSettings.xshift = 0; // video shift
GCSettings.yshift = 0;
}

View File

@ -369,10 +369,10 @@ static void UpdateScaling()
yscale *= GCSettings.ZoomLevel;
// Set new aspect
square[0] = square[9] = -xscale;
square[3] = square[6] = xscale;
square[1] = square[4] = yscale;
square[7] = square[10] = -yscale;
square[0] = square[9] = -xscale + GCSettings.xshift;
square[3] = square[6] = xscale + GCSettings.xshift;
square[1] = square[4] = yscale - GCSettings.yshift;
square[7] = square[10] = -yscale - GCSettings.yshift;
DCFlushRange (square, 32); // update memory BEFORE the GPU accesses it!
draw_init ();