mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-01 08:25:18 +01:00
1. fixed crash on resolution change in hq2x filtering (now just treats it as original mode in such cases)
2. reimplemented superscope turbo (hold button to enable) - updated settings to 4.0.2 to reflect 2 reduced button map sizes
This commit is contained in:
parent
958e159845
commit
40063aecbf
@ -129,7 +129,7 @@ void ResetControls()
|
|||||||
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_BUTTON_B;
|
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_BUTTON_B;
|
||||||
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_TRIGGER_Z;
|
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_TRIGGER_Z;
|
||||||
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_BUTTON_Y;
|
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_BUTTON_Y;
|
||||||
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_BUTTON_X;
|
//btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_BUTTON_X;
|
||||||
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_BUTTON_START;
|
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_BUTTON_START;
|
||||||
|
|
||||||
/*** Superscope : wiimote button mapping ***/
|
/*** Superscope : wiimote button mapping ***/
|
||||||
@ -137,7 +137,7 @@ void ResetControls()
|
|||||||
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_B;
|
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_B;
|
||||||
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_A;
|
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_A;
|
||||||
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_MINUS;
|
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_MINUS;
|
||||||
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_UP;
|
//btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_UP;
|
||||||
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_DOWN;
|
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_DOWN;
|
||||||
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_PLUS;
|
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_PLUS;
|
||||||
|
|
||||||
@ -466,7 +466,7 @@ void decodepad (int pad)
|
|||||||
{
|
{
|
||||||
// buttons
|
// buttons
|
||||||
offset = 0x50;
|
offset = 0x50;
|
||||||
for (i = 0; i < 6; i++)
|
for (i = 0; i < 5; i++)
|
||||||
{
|
{
|
||||||
if (jp & btnmap[CTRL_SCOPE][CTRLR_GCPAD][i]
|
if (jp & btnmap[CTRL_SCOPE][CTRLR_GCPAD][i]
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
@ -474,22 +474,14 @@ void decodepad (int pad)
|
|||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if(i == 3 || i == 4) // turbo
|
if(i == 3) // if turbo button pressed, turn turbo on
|
||||||
{
|
Settings.TurboMode |= 1;
|
||||||
if((i == 3 && scopeTurbo == 1) || // turbo ON already, don't change
|
|
||||||
(i == 4 && scopeTurbo == 0)) // turbo OFF already, don't change
|
|
||||||
{
|
|
||||||
S9xReportButton(offset + i, false);
|
|
||||||
}
|
|
||||||
else // turbo changed to ON or OFF
|
|
||||||
{
|
|
||||||
scopeTurbo = 4-i;
|
|
||||||
S9xReportButton(offset + i, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
S9xReportButton(offset + i, true);
|
S9xReportButton(offset + i, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if (i == 3)
|
||||||
|
Settings.TurboMode |= 0;
|
||||||
else
|
else
|
||||||
S9xReportButton(offset + i, false);
|
S9xReportButton(offset + i, false);
|
||||||
}
|
}
|
||||||
@ -699,7 +691,7 @@ void SetDefaultButtonMap ()
|
|||||||
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope AimOffscreen");
|
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope AimOffscreen");
|
||||||
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope Cursor");
|
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope Cursor");
|
||||||
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope ToggleTurbo");
|
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope ToggleTurbo");
|
||||||
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope ToggleTurbo");
|
//ASSIGN_BUTTON_FALSE (maxcode++, "Superscope ToggleTurbo");
|
||||||
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope Pause");
|
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope Pause");
|
||||||
|
|
||||||
maxcode = 0x60;
|
maxcode = 0x60;
|
||||||
|
@ -2531,8 +2531,7 @@ static int MenuSettingsMappingsMap()
|
|||||||
sprintf(options.name[i++], "Fire");
|
sprintf(options.name[i++], "Fire");
|
||||||
sprintf(options.name[i++], "Aim Offscreen");
|
sprintf(options.name[i++], "Aim Offscreen");
|
||||||
sprintf(options.name[i++], "Cursor");
|
sprintf(options.name[i++], "Cursor");
|
||||||
sprintf(options.name[i++], "Turbo On");
|
sprintf(options.name[i++], "Turbo");
|
||||||
sprintf(options.name[i++], "Turbo Off");
|
|
||||||
sprintf(options.name[i++], "Pause");
|
sprintf(options.name[i++], "Pause");
|
||||||
options.length = i;
|
options.length = i;
|
||||||
break;
|
break;
|
||||||
@ -3603,7 +3602,7 @@ MainMenu (int menu)
|
|||||||
ResumeGui();
|
ResumeGui();
|
||||||
|
|
||||||
// Load preferences
|
// Load preferences
|
||||||
if(!LoadPrefs())
|
if(!LoadPrefs()) //TODO: notify that preferences reset
|
||||||
SavePrefs(SILENT);
|
SavePrefs(SILENT);
|
||||||
|
|
||||||
#ifndef NO_SOUND
|
#ifndef NO_SOUND
|
||||||
|
@ -274,6 +274,8 @@ decodePrefsData (int method)
|
|||||||
result = false;
|
result = false;
|
||||||
else if(verMajor < 4) // less than version 4.0.0
|
else if(verMajor < 4) // less than version 4.0.0
|
||||||
result = false; // reset settings
|
result = false; // reset settings
|
||||||
|
else if(verMajor == 4 && verMinor == 0 && verMinor < 2) // anything less than 4.0.2
|
||||||
|
result = false; // reset settings
|
||||||
else if(verMajor > curMajor || verMinor > curMinor || verPoint > curPoint) // some future version
|
else if(verMajor > curMajor || verMinor > curMinor || verPoint > curPoint) // some future version
|
||||||
result = false; // reset settings
|
result = false; // reset settings
|
||||||
else
|
else
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "filelist.h"
|
#include "filelist.h"
|
||||||
|
|
||||||
#define APPNAME "Snes9x GX"
|
#define APPNAME "Snes9x GX"
|
||||||
#define APPVERSION "4.0.1"
|
#define APPVERSION "4.0.2"
|
||||||
#define PREF_FILE_NAME "settings.xml"
|
#define PREF_FILE_NAME "settings.xml"
|
||||||
|
|
||||||
#define NOTSILENT 0
|
#define NOTSILENT 0
|
||||||
|
@ -647,8 +647,8 @@ ResetVideo_Emu ()
|
|||||||
{
|
{
|
||||||
rmode = tvmodes[i];
|
rmode = tvmodes[i];
|
||||||
|
|
||||||
// hack to fix video output for hq2x
|
// hack to fix video output for hq2x (only when actually filtering; h<=239, w<=256)
|
||||||
if (GCSettings.FilterMethod != FILTER_NONE)
|
if (GCSettings.FilterMethod != FILTER_NONE && vheight <= 239 && vwidth <= 256)
|
||||||
{
|
{
|
||||||
memcpy(&TV_Custom, tvmodes[i], sizeof(TV_Custom));
|
memcpy(&TV_Custom, tvmodes[i], sizeof(TV_Custom));
|
||||||
rmode = &TV_Custom;
|
rmode = &TV_Custom;
|
||||||
@ -733,13 +733,14 @@ update_video (int width, int height)
|
|||||||
/** Update scaling **/
|
/** Update scaling **/
|
||||||
if (GCSettings.render == 0) // original render mode
|
if (GCSettings.render == 0) // original render mode
|
||||||
{
|
{
|
||||||
if (GCSettings.FilterMethod != FILTER_NONE) // hq2x filters
|
if (GCSettings.FilterMethod != FILTER_NONE && vheight <= 239 && vwidth <= 256)
|
||||||
{
|
{ // filters; normal operation
|
||||||
xscale = vwidth;
|
xscale = vwidth;
|
||||||
yscale = vheight;
|
yscale = vheight;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{ // no filtering
|
||||||
|
fscale = 1;
|
||||||
xscale = 256;
|
xscale = 256;
|
||||||
yscale = vheight / 2;
|
yscale = vheight / 2;
|
||||||
}
|
}
|
||||||
@ -779,7 +780,7 @@ update_video (int width, int height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// convert image to texture
|
// convert image to texture
|
||||||
if (GCSettings.FilterMethod != FILTER_NONE)
|
if (GCSettings.FilterMethod != FILTER_NONE && vheight <= 239 && vwidth <= 256) // don't do filtering on game textures > 256 x 239
|
||||||
{
|
{
|
||||||
FilterMethod ((uint8*) GFX.Screen, EXT_PITCH, (uint8*) filtermem, vwidth*fscale*2, vwidth, vheight);
|
FilterMethod ((uint8*) GFX.Screen, EXT_PITCH, (uint8*) filtermem, vwidth*fscale*2, vwidth, vheight);
|
||||||
MakeTexture565((char *) filtermem, (char *) texturemem, vwidth*fscale, vheight*fscale);
|
MakeTexture565((char *) filtermem, (char *) texturemem, vwidth*fscale, vheight*fscale);
|
||||||
|
Loading…
Reference in New Issue
Block a user