diff --git a/source/ngc/filebrowser.cpp b/source/ngc/filebrowser.cpp index 18e153f..e54d770 100644 --- a/source/ngc/filebrowser.cpp +++ b/source/ngc/filebrowser.cpp @@ -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; diff --git a/source/ngc/filebrowser.h b/source/ngc/filebrowser.h index 2965c55..4e19eaa 100644 --- a/source/ngc/filebrowser.h +++ b/source/ngc/filebrowser.h @@ -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(); diff --git a/source/ngc/lang/fr.lang b/source/ngc/lang/fr.lang index a6bcdff..5a00d09 100644 --- a/source/ngc/lang/fr.lang +++ b/source/ngc/lang/fr.lang @@ -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" diff --git a/source/ngc/menu.cpp b/source/ngc/menu.cpp index ae41e08..4c37d26 100644 --- a/source/ngc/menu.cpp +++ b/source/ngc/menu.cpp @@ -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(); } diff --git a/source/ngc/preferences.cpp b/source/ngc/preferences.cpp index 944e5ad..bde8706 100644 --- a/source/ngc/preferences.cpp +++ b/source/ngc/preferences.cpp @@ -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; diff --git a/source/ngc/snes9xGX.h b/source/ngc/snes9xGX.h index 828cf8d..3843100 100644 --- a/source/ngc/snes9xGX.h +++ b/source/ngc/snes9xGX.h @@ -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; diff --git a/source/snes9x/controls.cpp b/source/snes9x/controls.cpp index b34bf95..588f36e 100644 --- a/source/snes9x/controls.cpp +++ b/source/snes9x/controls.cpp @@ -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]); }