mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-01 00:15:14 +01:00
- add video shift options
- moved video options to their own menu
This commit is contained in:
parent
4fe0babc74
commit
8d07410616
@ -117,7 +117,7 @@ LoadManager ()
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Preferences Menu
|
* Preferences Menu
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
static int prefmenuCount = 16;
|
static int prefmenuCount = 11;
|
||||||
static char prefmenu[][50] = {
|
static char prefmenu[][50] = {
|
||||||
|
|
||||||
"Load Method",
|
"Load Method",
|
||||||
@ -131,11 +131,6 @@ static char prefmenu[][50] = {
|
|||||||
|
|
||||||
"Reverse Stereo",
|
"Reverse Stereo",
|
||||||
"Interpolated Sound",
|
"Interpolated Sound",
|
||||||
"Transparency",
|
|
||||||
"Display Frame Rate",
|
|
||||||
"Enable Zooming",
|
|
||||||
"Video Filtering",
|
|
||||||
"Widescreen",
|
|
||||||
|
|
||||||
"Save Preferences",
|
"Save Preferences",
|
||||||
"Back to Main Menu"
|
"Back to Main Menu"
|
||||||
@ -208,10 +203,6 @@ PreferencesMenu ()
|
|||||||
prefmenu[1][0] = '\0';
|
prefmenu[1][0] = '\0';
|
||||||
prefmenu[3][0] = '\0';
|
prefmenu[3][0] = '\0';
|
||||||
|
|
||||||
// don't allow original render mode if progressive video mode detected
|
|
||||||
if (GCSettings.render==0 && progressive)
|
|
||||||
GCSettings.render++;
|
|
||||||
|
|
||||||
if (GCSettings.AutoLoad == 0) sprintf (prefmenu[4],"Auto Load OFF");
|
if (GCSettings.AutoLoad == 0) sprintf (prefmenu[4],"Auto Load OFF");
|
||||||
else if (GCSettings.AutoLoad == 1) sprintf (prefmenu[4],"Auto Load SRAM");
|
else if (GCSettings.AutoLoad == 1) sprintf (prefmenu[4],"Auto Load SRAM");
|
||||||
else if (GCSettings.AutoLoad == 2) sprintf (prefmenu[4],"Auto Load SNAPSHOT");
|
else if (GCSettings.AutoLoad == 2) sprintf (prefmenu[4],"Auto Load SNAPSHOT");
|
||||||
@ -230,25 +221,6 @@ PreferencesMenu ()
|
|||||||
sprintf (prefmenu[8], "Interpolated Sound %s",
|
sprintf (prefmenu[8], "Interpolated Sound %s",
|
||||||
Settings.InterpolatedSound == true ? " ON" : "OFF");
|
Settings.InterpolatedSound == true ? " ON" : "OFF");
|
||||||
|
|
||||||
sprintf (prefmenu[9], "Transparency %s",
|
|
||||||
Settings.Transparency == true ? " ON" : "OFF");
|
|
||||||
|
|
||||||
sprintf (prefmenu[10], "Display Frame Rate %s",
|
|
||||||
Settings.DisplayFrameRate == true ? " ON" : "OFF");
|
|
||||||
|
|
||||||
sprintf (prefmenu[11], "Enable Zooming %s",
|
|
||||||
GCSettings.NGCZoom == true ? " ON" : "OFF");
|
|
||||||
|
|
||||||
if ( GCSettings.render == 0 )
|
|
||||||
sprintf (prefmenu[12], "Video Rendering Original");
|
|
||||||
if ( GCSettings.render == 1 )
|
|
||||||
sprintf (prefmenu[12], "Video Rendering Filtered");
|
|
||||||
if ( GCSettings.render == 2 )
|
|
||||||
sprintf (prefmenu[12], "Video Rendering Unfiltered");
|
|
||||||
|
|
||||||
sprintf (prefmenu[13], "Video Scaling %s",
|
|
||||||
GCSettings.widescreen == true ? "16:9 Correction" : "Default");
|
|
||||||
|
|
||||||
ret = RunMenu (prefmenu, prefmenuCount, (char*)"Preferences", 16);
|
ret = RunMenu (prefmenu, prefmenuCount, (char*)"Preferences", 16);
|
||||||
|
|
||||||
switch (ret)
|
switch (ret)
|
||||||
@ -292,33 +264,143 @@ PreferencesMenu ()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 9:
|
case 9:
|
||||||
Settings.Transparency ^= 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 10:
|
|
||||||
Settings.DisplayFrameRate ^= 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 11:
|
|
||||||
GCSettings.NGCZoom ^= 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 12:
|
|
||||||
GCSettings.render++;
|
|
||||||
if (GCSettings.render > 2 )
|
|
||||||
GCSettings.render = 0;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 13:
|
|
||||||
GCSettings.widescreen ^= 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 14:
|
|
||||||
SavePrefs(GCSettings.SaveMethod, NOTSILENT);
|
SavePrefs(GCSettings.SaveMethod, NOTSILENT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case -1: /*** Button B ***/
|
case -1: /*** Button B ***/
|
||||||
case 15:
|
case 10:
|
||||||
|
quit = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
menu = oldmenu;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Video Options
|
||||||
|
***************************************************************************/
|
||||||
|
static int videomenuCount = 14;
|
||||||
|
static char videomenu[][50] = {
|
||||||
|
|
||||||
|
"Transparency",
|
||||||
|
"Display Frame Rate",
|
||||||
|
"Enable Zooming",
|
||||||
|
"Video Filtering",
|
||||||
|
"Widescreen",
|
||||||
|
|
||||||
|
"X-shift ++",
|
||||||
|
" --",
|
||||||
|
"Y-shift ++",
|
||||||
|
" --",
|
||||||
|
"X-shift: ",
|
||||||
|
"Y-shift: ",
|
||||||
|
"Reset Video Shifts",
|
||||||
|
|
||||||
|
"Save Preferences",
|
||||||
|
"Back to Main Menu"
|
||||||
|
};
|
||||||
|
|
||||||
|
void
|
||||||
|
VideoOptions ()
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
int quit = 0;
|
||||||
|
int oldmenu = menu;
|
||||||
|
menu = 0;
|
||||||
|
while (quit == 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
sprintf (prefmenu[0], "Transparency %s",
|
||||||
|
Settings.Transparency == true ? " ON" : "OFF");
|
||||||
|
|
||||||
|
sprintf (prefmenu[1], "Display Frame Rate %s",
|
||||||
|
Settings.DisplayFrameRate == true ? " ON" : "OFF");
|
||||||
|
|
||||||
|
sprintf (prefmenu[2], "Enable Zooming %s",
|
||||||
|
GCSettings.NGCZoom == true ? " ON" : "OFF");
|
||||||
|
|
||||||
|
// don't allow original render mode if progressive video mode detected
|
||||||
|
if (GCSettings.render==0 && progressive)
|
||||||
|
GCSettings.render++;
|
||||||
|
|
||||||
|
if ( GCSettings.render == 0 )
|
||||||
|
sprintf (prefmenu[3], "Video Rendering Original");
|
||||||
|
if ( GCSettings.render == 1 )
|
||||||
|
sprintf (prefmenu[3], "Video Rendering Filtered");
|
||||||
|
if ( GCSettings.render == 2 )
|
||||||
|
sprintf (prefmenu[3], "Video Rendering Unfiltered");
|
||||||
|
|
||||||
|
sprintf (prefmenu[4], "Video Scaling %s",
|
||||||
|
GCSettings.widescreen == true ? "16:9 Correction" : "Default");
|
||||||
|
|
||||||
|
sprintf (prefmenu[9], "X-shift: %d", GCSettings.xshift);
|
||||||
|
|
||||||
|
sprintf (prefmenu[10], "Y-shift: %d", GCSettings.yshift);
|
||||||
|
|
||||||
|
ret = RunMenu (videomenu, videomenuCount, (char*)"Video Options", 16);
|
||||||
|
|
||||||
|
switch (ret)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
Settings.Transparency ^= 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
Settings.DisplayFrameRate ^= 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
GCSettings.NGCZoom ^= 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
GCSettings.render++;
|
||||||
|
if (GCSettings.render > 2 )
|
||||||
|
GCSettings.render = 0;
|
||||||
|
// reset zoom
|
||||||
|
zoom_reset ();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
GCSettings.widescreen ^= 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 5:
|
||||||
|
// xscale UP
|
||||||
|
GCSettings.xshift++;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 6:
|
||||||
|
// xscale DOWN
|
||||||
|
GCSettings.xshift--;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 7:
|
||||||
|
// yscale UP
|
||||||
|
GCSettings.yshift++;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 8:
|
||||||
|
// yscale DOWN
|
||||||
|
GCSettings.yshift--;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 9:
|
||||||
|
case 10:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 11:
|
||||||
|
// reset video shifts
|
||||||
|
GCSettings.xshift = GCSettings.yshift = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 12:
|
||||||
|
SavePrefs(GCSettings.SaveMethod, NOTSILENT);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case -1: /*** Button B ***/
|
||||||
|
case 13:
|
||||||
quit = 1;
|
quit = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -941,11 +1023,16 @@ ConfigureControllers ()
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Main Menu
|
* Main Menu
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
int menucount = 7;
|
int menucount = 8;
|
||||||
char menuitems[][50] = {
|
char menuitems[][50] = {
|
||||||
"Choose Game", "Controller Configuration", "Preferences",
|
"Choose Game",
|
||||||
|
"Controller Configuration",
|
||||||
|
"Preferences",
|
||||||
"Game Menu",
|
"Game Menu",
|
||||||
"Credits", "Reset System", "Return to Loader"
|
"Video Options",
|
||||||
|
"Credits",
|
||||||
|
"Reset System",
|
||||||
|
"Return to Loader"
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -997,17 +1084,22 @@ mainmenu (int selectedMenu)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
|
// Video Options
|
||||||
|
VideoOptions ();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 5:
|
||||||
// Credits
|
// Credits
|
||||||
Credits ();
|
Credits ();
|
||||||
WaitButtonA ();
|
WaitButtonA ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 6:
|
||||||
// Reset the Gamecube/Wii
|
// Reset the Gamecube/Wii
|
||||||
Reboot();
|
Reboot();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 7:
|
||||||
// Exit to Loader
|
// Exit to Loader
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
#ifdef WII_DVD
|
#ifdef WII_DVD
|
||||||
|
@ -32,6 +32,8 @@ DefaultSettings ()
|
|||||||
GCSettings.AutoLoad = 1;
|
GCSettings.AutoLoad = 1;
|
||||||
GCSettings.AutoSave = 1;
|
GCSettings.AutoSave = 1;
|
||||||
|
|
||||||
|
GCSettings.VerifySaves = 0;
|
||||||
|
|
||||||
// custom SMB settings
|
// custom SMB settings
|
||||||
strncpy (GCSettings.smbip, "", 15); // IP Address of share server
|
strncpy (GCSettings.smbip, "", 15); // IP Address of share server
|
||||||
strncpy (GCSettings.smbuser, "", 19); // Your share user
|
strncpy (GCSettings.smbuser, "", 19); // Your share user
|
||||||
@ -49,15 +51,17 @@ DefaultSettings ()
|
|||||||
GCSettings.smbsvid[0] = 0;
|
GCSettings.smbsvid[0] = 0;
|
||||||
GCSettings.smbgcid[0] = 0;
|
GCSettings.smbgcid[0] = 0;
|
||||||
|
|
||||||
GCSettings.NGCZoom = 0;
|
GCSettings.Superscope = 0;
|
||||||
GCSettings.VerifySaves = 0;
|
GCSettings.Mouse = 0;
|
||||||
|
GCSettings.Justifier = 0;
|
||||||
|
|
||||||
|
GCSettings.NGCZoom = 0; // zooming default off
|
||||||
|
|
||||||
GCSettings.render = 2; // Unfiltered
|
GCSettings.render = 2; // Unfiltered
|
||||||
GCSettings.widescreen = 0; // no aspect ratio correction
|
GCSettings.widescreen = 0; // no aspect ratio correction
|
||||||
|
|
||||||
GCSettings.Superscope = 0;
|
GCSettings.xshift = 0; // video shift
|
||||||
GCSettings.Mouse = 0;
|
GCSettings.yshift = 0;
|
||||||
GCSettings.Justifier = 0;
|
|
||||||
|
|
||||||
/****************** SNES9x Settings ***********************/
|
/****************** SNES9x Settings ***********************/
|
||||||
|
|
||||||
|
@ -57,6 +57,8 @@ struct SGCSettings{
|
|||||||
int Mouse;
|
int Mouse;
|
||||||
int Justifier;
|
int Justifier;
|
||||||
int widescreen; // 0 - 4:3 aspect, 1 - 16:9 aspect
|
int widescreen; // 0 - 4:3 aspect, 1 - 16:9 aspect
|
||||||
|
int xshift; // video output shift
|
||||||
|
int yshift;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct SGCSettings GCSettings;
|
extern struct SGCSettings GCSettings;
|
||||||
|
@ -735,8 +735,7 @@ update_video (int width, int height)
|
|||||||
|
|
||||||
if ( CheckVideo && (IPPU.RenderedFramesCount != prevRenderedFrameCount) ) // if we get back from the menu, and have rendered at least 1 frame
|
if ( CheckVideo && (IPPU.RenderedFramesCount != prevRenderedFrameCount) ) // if we get back from the menu, and have rendered at least 1 frame
|
||||||
{
|
{
|
||||||
int xscale, yscale, xshift, yshift;
|
int xscale, yscale;
|
||||||
yshift = xshift = 0;
|
|
||||||
|
|
||||||
ResetVideo_Emu (); // reset video to emulator rendering settings
|
ResetVideo_Emu (); // reset video to emulator rendering settings
|
||||||
|
|
||||||
@ -758,10 +757,10 @@ update_video (int width, int height)
|
|||||||
xscale *= zoom_level;
|
xscale *= zoom_level;
|
||||||
yscale *= zoom_level;
|
yscale *= zoom_level;
|
||||||
|
|
||||||
square[6] = square[3] = xscale + xshift;
|
square[6] = square[3] = xscale + GCSettings.xshift;
|
||||||
square[0] = square[9] = -xscale + xshift;
|
square[0] = square[9] = -xscale + GCSettings.xshift;
|
||||||
square[4] = square[1] = yscale + yshift;
|
square[4] = square[1] = yscale + GCSettings.yshift;
|
||||||
square[7] = square[10] = -yscale + yshift;
|
square[7] = square[10] = -yscale + GCSettings.yshift;
|
||||||
|
|
||||||
GX_InvVtxCache (); // update vertex cache
|
GX_InvVtxCache (); // update vertex cache
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user