menu tweaks, change default video mode

This commit is contained in:
dborth 2008-09-11 04:41:58 +00:00
parent d7c0d42004
commit 48618fddaf
4 changed files with 45 additions and 41 deletions

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Snes9x 1.50
* Snes9x 1.51
*
* Nintendo Wii/Gamecube Port
*
@ -213,6 +213,10 @@ PreferencesMenu ()
prefmenu[1][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");
else if (GCSettings.AutoLoad == 1) sprintf (prefmenu[4],"Auto Load SRAM");
else if (GCSettings.AutoLoad == 2) sprintf (prefmenu[4],"Auto Load SNAPSHOT");
@ -241,14 +245,14 @@ PreferencesMenu ()
GCSettings.NGCZoom == true ? " ON" : "OFF");
if ( GCSettings.render == 0 )
sprintf (prefmenu[12], "Render Mode Original");
sprintf (prefmenu[12], "Video Rendering Original");
if ( GCSettings.render == 1 )
sprintf (prefmenu[12], "Render Mode Filtered");
sprintf (prefmenu[12], "Video Rendering Filtered");
if ( GCSettings.render == 2 )
sprintf (prefmenu[12], "Render Mode Unfiltered");
sprintf (prefmenu[12], "Video Rendering Unfiltered");
sprintf (prefmenu[13], "Widescreen %s",
GCSettings.widescreen == true ? "ON" : "OFF");
sprintf (prefmenu[13], "Video Scaling %s",
GCSettings.widescreen == true ? "16:9 Correction" : "Default");
ret = RunMenu (prefmenu, prefmenuCount, (char*)"Preferences", 16);
@ -306,15 +310,12 @@ PreferencesMenu ()
case 12:
GCSettings.render++;
if (GCSettings.render > 2 ) GCSettings.render = 0;
extern bool progressive;
if (GCSettings.render==0 && progressive) GCSettings.render++; // don't do original render mode if progressive video mode detected
if (GCSettings.render > 2 )
GCSettings.render = 0;
break;
case 13:
GCSettings.widescreen ^= 1;
//if (!GCSettings.render) GCSettings.widescreen = 0; // don't allow on original render modes
break;
case 14:

View File

@ -1,13 +1,15 @@
/****************************************************************************
* Snes9x 1.50
* Snes9x 1.51
*
* Nintendo Wii/Gamecube Port
*
* Nintendo Gamecube Port
* softdev July 2006
* crunchy2 May 2007
* Tantric September 2008
*
* s9xconfig.cpp
*
* Configuration parameters have been moved here for easier maintenance.
* Configuration parameters are here for easy maintenance.
* Refer to Snes9x.h for all combinations.
* The defaults used here are taken directly from porting.html
****************************************************************************/
@ -51,8 +53,8 @@ DefaultSettings ()
GCSettings.NGCZoom = 0;
GCSettings.VerifySaves = 0;
GCSettings.render = 0;
GCSettings.widescreen = 0;
GCSettings.render = 2; // Unfiltered
GCSettings.widescreen = 0; // no aspect ratio correction
GCSettings.Superscope = 0;
GCSettings.Mouse = 0;

View File

@ -1,13 +1,14 @@
/****************************************************************************
* Snes9x 1.50
* Snes9x 1.51
*
* Nintendo Gamecube Video
*
* This is a modified renderer from the Genesis Plus Project.
* Well - you didn't expect me to write another one did ya ? -;)
* Nintendo Wii/Gamecube Port
*
* softdev July 2006
* crunchy2 May 2007
*
* video.cpp
*
* Video routines
****************************************************************************/
#include <gccore.h>
#include <ogcsys.h>
@ -20,7 +21,6 @@
#include "memmap.h"
#include "aram.h"
#include "snes9xGX.h"
#include "video.h"
#include "gui.h"
@ -462,29 +462,29 @@ InitGCVideo ()
ARAMPut ((char *) romptr, (char *) AR_SNESROM, ARAM_ROMSIZE);
}
// get default video mode
vmode = VIDEO_GetPreferredMode(NULL);
switch (vmode->viTVMode >> 2)
{
case VI_PAL:
case VI_PAL:
// 576 lines (PAL 50Hz)
// display should be centered vertically (borders)
vmode = &TVPal574IntDfScale;
vmode->xfbHeight = 480;
vmode->viYOrigin = (VI_MAX_HEIGHT_PAL - 480)/2;
vmode->viHeight = 480;
vmode_60hz = 0;
break;
case VI_NTSC:
case VI_NTSC:
// 480 lines (NTSC 60hz)
vmode_60hz = 1;
break;
default:
default:
// 480 lines (PAL 60Hz)
vmode_60hz = 1;
break;
@ -493,7 +493,7 @@ InitGCVideo ()
// check for progressive scan
if (vmode->viTVMode == VI_TVMODE_NTSC_PROG)
progressive = true;
VIDEO_Configure (vmode);
@ -595,7 +595,7 @@ ResetVideo_Emu ()
break;
}
if (GCSettings.render == 0) // original render mode
{
@ -612,7 +612,7 @@ ResetVideo_Emu ()
else if (GCSettings.render == 2) // unfiltered
{
rmode = vmode;
}
}
else // filtered
{
rmode = vmode; // same mode as menu
@ -788,14 +788,14 @@ update_video (int width, int height)
square[0] = square[9] = -xscale + xshift;
square[4] = square[1] = yscale + yshift;
square[7] = square[10] = -yscale + yshift;
GX_InvVtxCache (); // update vertex cache
GX_InitTexObj (&texobj, texturemem, vwidth, vheight, GX_TF_RGB565, GX_CLAMP, GX_CLAMP, GX_FALSE); // initialize the texture obj we are going to use
if (GCSettings.render == 0 || GCSettings.render == 2)
GX_InitTexObjLOD(&texobj,GX_NEAR,GX_NEAR_MIP_NEAR,2.5,9.0,0.0,GX_FALSE,GX_FALSE,GX_ANISO_1); // original/unfiltered video mode: force texture filtering OFF
GX_LoadTexObj (&texobj, GX_TEXMAP0); // load texture object so its ready to use
/*
@ -809,10 +809,8 @@ update_video (int width, int height)
oldvwidth = vwidth;
oldvheight = vheight;
CheckVideo = 0;
//clearscreen (); // this hack fixes my 'not updating scaling' problem
}
/*
// for zooming
memset (&view, 0, sizeof (Mtx));

View File

@ -1,17 +1,18 @@
/****************************************************************************
* Snes9x 1.50
* Snes9x 1.51
*
* Nintendo Gamecube Video
*
* This is a modified renderer from the Genesis Plus Project.
* Well - you didn't expect me to write another one did ya ? -;)
* Nintendo Wii/Gamecube Port
*
* softdev July 2006
*
* video.h
*
* Video routines
****************************************************************************/
#ifndef _GCVIDEOH_
#define _GCVIDEOH_
//#include <gccore.h>
#include <ogcsys.h>
#include "snes9x.h"
@ -26,4 +27,6 @@ void showscreen ();
void zoom (float speed);
void zoom_reset ();
extern bool progressive;
#endif