mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-27 21:14:21 +01:00
crosshair disable option, prevent update notification from interfering with game loading
This commit is contained in:
parent
bc4aff009d
commit
ad5c687ce8
@ -46,6 +46,7 @@ static char szpath[MAXPATHLEN];
|
||||
static bool inSz = false;
|
||||
|
||||
unsigned long SNESROMSize = 0;
|
||||
bool loadingFile = false;
|
||||
|
||||
/****************************************************************************
|
||||
* autoLoadMethod()
|
||||
@ -457,10 +458,11 @@ int WiiFileLoader()
|
||||
{
|
||||
int size;
|
||||
char filepath[1024];
|
||||
|
||||
|
||||
memset(Memory.NSRTHeader, 0, sizeof(Memory.NSRTHeader));
|
||||
Memory.HeaderCount = 0;
|
||||
|
||||
loadingFile = true;
|
||||
|
||||
if(!inSz)
|
||||
{
|
||||
if(!MakeFilePath(filepath, FILE_ROM))
|
||||
@ -478,6 +480,7 @@ int WiiFileLoader()
|
||||
BrowserChangeFolder();
|
||||
}
|
||||
}
|
||||
loadingFile = false;
|
||||
|
||||
if(size <= 0)
|
||||
return 0;
|
||||
|
@ -53,6 +53,7 @@ enum
|
||||
};
|
||||
|
||||
extern unsigned long SNESROMSize;
|
||||
extern bool loadingFile;
|
||||
|
||||
bool MakeFilePath(char filepath[], int type, char * filename = NULL, int filenum = -2);
|
||||
int UpdateDirName();
|
||||
|
@ -356,7 +356,7 @@ msgid "Settings - Network"
|
||||
msgstr "Paramètres - Réseau"
|
||||
|
||||
msgid "Settings - Saving & Loading"
|
||||
msgstr "Paramètres - Sauvegarde & Chargement"
|
||||
msgstr "Paramètres - Sauv. & Chargement"
|
||||
|
||||
msgid "Shift"
|
||||
msgstr "Maj"
|
||||
|
@ -297,7 +297,9 @@ UpdateGUI (void *arg)
|
||||
if(updateFound)
|
||||
{
|
||||
updateFound = false;
|
||||
LWP_CreateThread (&updatethread, EmulatorUpdate, NULL, NULL, 0, 70);
|
||||
|
||||
if(!loadingFile)
|
||||
LWP_CreateThread (&updatethread, EmulatorUpdate, NULL, NULL, 0, 70);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2996,6 +2998,7 @@ static int MenuSettingsVideo()
|
||||
sprintf(options.name[i++], "Filtering");
|
||||
sprintf(options.name[i++], "Screen Zoom");
|
||||
sprintf(options.name[i++], "Screen Position");
|
||||
sprintf(options.name[i++], "Crosshair");
|
||||
sprintf(options.name[i++], "Video Mode");
|
||||
options.length = i;
|
||||
|
||||
@ -3075,7 +3078,12 @@ static int MenuSettingsVideo()
|
||||
case 4:
|
||||
ScreenPositionWindow();
|
||||
break;
|
||||
|
||||
case 5:
|
||||
GCSettings.crosshair ^= 1;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
GCSettings.videomode++;
|
||||
if(GCSettings.videomode > 4)
|
||||
GCSettings.videomode = 0;
|
||||
@ -3105,19 +3113,20 @@ static int MenuSettingsVideo()
|
||||
sprintf (options.value[2], "%s", GetFilterName((RenderFilter)GCSettings.FilterMethod));
|
||||
sprintf (options.value[3], "%.2f%%, %.2f%%", GCSettings.zoomHor*100, GCSettings.zoomVert*100);
|
||||
sprintf (options.value[4], "%d, %d", GCSettings.xshift, GCSettings.yshift);
|
||||
sprintf (options.value[5], "%s", GCSettings.crosshair == 1 ? "On" : "Off");
|
||||
|
||||
switch(GCSettings.videomode)
|
||||
{
|
||||
case 0:
|
||||
sprintf (options.value[5], "Automatic (Recommended)"); break;
|
||||
sprintf (options.value[6], "Automatic (Recommended)"); break;
|
||||
case 1:
|
||||
sprintf (options.value[5], "NTSC (480i)"); break;
|
||||
sprintf (options.value[6], "NTSC (480i)"); break;
|
||||
case 2:
|
||||
sprintf (options.value[5], "Progressive (480p)"); break;
|
||||
sprintf (options.value[6], "Progressive (480p)"); break;
|
||||
case 3:
|
||||
sprintf (options.value[5], "PAL (50Hz)"); break;
|
||||
sprintf (options.value[6], "PAL (50Hz)"); break;
|
||||
case 4:
|
||||
sprintf (options.value[5], "PAL (60Hz)"); break;
|
||||
sprintf (options.value[6], "PAL (60Hz)"); break;
|
||||
}
|
||||
optionBrowser.TriggerUpdate();
|
||||
}
|
||||
|
@ -140,6 +140,7 @@ preparePrefsData ()
|
||||
createXMLSetting("zoomVert", "Vertical Zoom Level", FtoStr(GCSettings.zoomVert));
|
||||
createXMLSetting("render", "Video Filtering", toStr(GCSettings.render));
|
||||
createXMLSetting("widescreen", "Aspect Ratio Correction", toStr(GCSettings.widescreen));
|
||||
createXMLSetting("crosshair", "Crosshair", toStr(GCSettings.crosshair));
|
||||
createXMLSetting("FilterMethod", "Filter Method", toStr(GCSettings.FilterMethod));
|
||||
createXMLSetting("xshift", "Horizontal Video Shift", toStr(GCSettings.xshift));
|
||||
createXMLSetting("yshift", "Vertical Video Shift", toStr(GCSettings.yshift));
|
||||
@ -313,6 +314,7 @@ decodePrefsData ()
|
||||
loadXMLSetting(&GCSettings.zoomVert, "zoomVert");
|
||||
loadXMLSetting(&GCSettings.render, "render");
|
||||
loadXMLSetting(&GCSettings.widescreen, "widescreen");
|
||||
loadXMLSetting(&GCSettings.crosshair, "crosshair");
|
||||
loadXMLSetting(&GCSettings.FilterMethod, "FilterMethod");
|
||||
loadXMLSetting(&GCSettings.xshift, "xshift");
|
||||
loadXMLSetting(&GCSettings.yshift, "yshift");
|
||||
@ -411,6 +413,7 @@ DefaultSettings ()
|
||||
GCSettings.zoomVert = 1.0; // vertical zoom level
|
||||
GCSettings.xshift = 0; // horizontal video shift
|
||||
GCSettings.yshift = 0; // vertical video shift
|
||||
GCSettings.crosshair = 1;
|
||||
|
||||
GCSettings.WiimoteOrientation = 0;
|
||||
GCSettings.ExitAction = 0;
|
||||
|
@ -94,6 +94,7 @@ struct SGCSettings{
|
||||
int render; // 0 - original, 1 - filtered, 2 - unfiltered
|
||||
int FilterMethod; // convert to RenderFilter
|
||||
int Controller;
|
||||
int crosshair;
|
||||
int widescreen; // 0 - 4:3 aspect, 1 - 16:9 aspect
|
||||
int xshift; // video output shift
|
||||
int yshift;
|
||||
|
@ -194,6 +194,10 @@
|
||||
#include "netplay.h"
|
||||
#endif
|
||||
|
||||
#ifdef GEKKO
|
||||
#include "../ngc/snes9xGX.h"
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
#define NONE (-2)
|
||||
@ -3207,6 +3211,9 @@ void S9xControlEOF (void)
|
||||
DoGunLatch(superscope.x, superscope.y);
|
||||
|
||||
c = &superscope.crosshair;
|
||||
#ifdef GEKKO
|
||||
if(GCSettings.crosshair)
|
||||
#endif
|
||||
if (IPPU.RenderThisFrame)
|
||||
S9xDrawCrosshair(S9xGetCrosshair(c->img), c->fg, c->bg, superscope.x, superscope.y);
|
||||
}
|
||||
@ -3217,6 +3224,9 @@ void S9xControlEOF (void)
|
||||
if (n == 1 && !justifier.offscreen[1])
|
||||
{
|
||||
c = &justifier.crosshair[1];
|
||||
#ifdef GEKKO
|
||||
if(GCSettings.crosshair)
|
||||
#endif
|
||||
if (IPPU.RenderThisFrame)
|
||||
S9xDrawCrosshair(S9xGetCrosshair(c->img), c->fg, c->bg, justifier.x[1], justifier.y[1]);
|
||||
}
|
||||
@ -3236,6 +3246,9 @@ void S9xControlEOF (void)
|
||||
if (!justifier.offscreen[0])
|
||||
{
|
||||
c = &justifier.crosshair[0];
|
||||
#ifdef GEKKO
|
||||
if(GCSettings.crosshair)
|
||||
#endif
|
||||
if (IPPU.RenderThisFrame)
|
||||
S9xDrawCrosshair(S9xGetCrosshair(c->img), c->fg, c->bg, justifier.x[0], justifier.y[0]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user