mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-01 00:15:14 +01:00
Various minor updates/improvements (#1033)
* Add 1+2+Plus menu toggle option for Wiimote (credit to Niuus for the idea) * Update some text strings * Update credits * Add B/1 cancel trigger to WindowPrompts * Add option to mute game audio (credit: Tanooki16's Snes9xTX)
This commit is contained in:
parent
22c2fda8fd
commit
fb4165fb96
@ -772,7 +772,7 @@ bool MenuRequested()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (GCSettings.GamepadMenuToggle == 2) // L+R+Start combo only (frees up the right stick on GC/3rd party gamepad)
|
else if (GCSettings.GamepadMenuToggle == 2) // L+R+Start / 1+2+Plus (Wiimote) combo only (frees up the right stick on GC/3rd party gamepad)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
(userInput[i].pad.btns_h & PAD_TRIGGER_L &&
|
(userInput[i].pad.btns_h & PAD_TRIGGER_L &&
|
||||||
@ -782,6 +782,9 @@ bool MenuRequested()
|
|||||||
|| (userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_FULL_L &&
|
|| (userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_FULL_L &&
|
||||||
userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_FULL_R &&
|
userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_FULL_R &&
|
||||||
userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_PLUS)
|
userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_PLUS)
|
||||||
|
|| (userInput[i].wpad->btns_h & WPAD_BUTTON_PLUS &&
|
||||||
|
userInput[i].wpad->btns_h & WPAD_BUTTON_1 &&
|
||||||
|
userInput[i].wpad->btns_h & WPAD_BUTTON_2)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -802,6 +805,9 @@ bool MenuRequested()
|
|||||||
(userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_FULL_L &&
|
(userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_FULL_L &&
|
||||||
userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_FULL_R &&
|
userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_FULL_R &&
|
||||||
userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_PLUS)
|
userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_PLUS)
|
||||||
|
|| (userInput[i].wpad->btns_h & WPAD_BUTTON_PLUS &&
|
||||||
|
userInput[i].wpad->btns_h & WPAD_BUTTON_1 &&
|
||||||
|
userInput[i].wpad->btns_h & WPAD_BUTTON_2)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -218,6 +218,11 @@ WindowPrompt(const char *title, const char *msg, const char *btn1Label, const ch
|
|||||||
GuiImageData btnOutline(button_prompt_png);
|
GuiImageData btnOutline(button_prompt_png);
|
||||||
GuiImageData btnOutlineOver(button_prompt_over_png);
|
GuiImageData btnOutlineOver(button_prompt_over_png);
|
||||||
|
|
||||||
|
GuiTrigger trigB;
|
||||||
|
GuiTrigger trig1;
|
||||||
|
trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B, WIIDRC_BUTTON_B);
|
||||||
|
trig1.SetButtonOnlyTrigger(-1, WPAD_BUTTON_1, 0, 0);
|
||||||
|
|
||||||
GuiImageData dialogBox(dialogue_box_png);
|
GuiImageData dialogBox(dialogue_box_png);
|
||||||
GuiImage dialogBoxImg(&dialogBox);
|
GuiImage dialogBoxImg(&dialogBox);
|
||||||
|
|
||||||
@ -243,6 +248,8 @@ WindowPrompt(const char *title, const char *msg, const char *btn1Label, const ch
|
|||||||
{
|
{
|
||||||
btn1.SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM);
|
btn1.SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM);
|
||||||
btn1.SetPosition(0, -25);
|
btn1.SetPosition(0, -25);
|
||||||
|
btn1.SetTrigger(&trigB);
|
||||||
|
btn1.SetTrigger(&trig1);
|
||||||
}
|
}
|
||||||
|
|
||||||
btn1.SetLabel(&btn1Txt);
|
btn1.SetLabel(&btn1Txt);
|
||||||
@ -276,7 +283,11 @@ WindowPrompt(const char *title, const char *msg, const char *btn1Label, const ch
|
|||||||
promptWindow.Append(&btn1);
|
promptWindow.Append(&btn1);
|
||||||
|
|
||||||
if(btn2Label)
|
if(btn2Label)
|
||||||
|
{
|
||||||
promptWindow.Append(&btn2);
|
promptWindow.Append(&btn2);
|
||||||
|
btn2.SetTrigger(&trigB);
|
||||||
|
btn2.SetTrigger(&trig1);
|
||||||
|
}
|
||||||
|
|
||||||
promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50);
|
promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50);
|
||||||
CancelAction();
|
CancelAction();
|
||||||
@ -819,7 +830,7 @@ static void WindowCredits(void * ptr)
|
|||||||
creditsBoxImg.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
creditsBoxImg.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
||||||
creditsWindowBox.Append(&creditsBoxImg);
|
creditsWindowBox.Append(&creditsBoxImg);
|
||||||
|
|
||||||
int numEntries = 24;
|
int numEntries = 25;
|
||||||
GuiText * txt[numEntries];
|
GuiText * txt[numEntries];
|
||||||
|
|
||||||
txt[i] = new GuiText("Credits", 30, (GXColor){0, 0, 0, 255});
|
txt[i] = new GuiText("Credits", 30, (GXColor){0, 0, 0, 255});
|
||||||
@ -837,6 +848,8 @@ static void WindowCredits(void * ptr)
|
|||||||
txt[i]->SetPosition(60,y); i++;
|
txt[i]->SetPosition(60,y); i++;
|
||||||
txt[i] = new GuiText("Zopenko, michniewski");
|
txt[i] = new GuiText("Zopenko, michniewski");
|
||||||
txt[i]->SetPosition(350,y); i++; y+=24;
|
txt[i]->SetPosition(350,y); i++; y+=24;
|
||||||
|
txt[i] = new GuiText("InfiniteBlue, others");
|
||||||
|
txt[i]->SetPosition(350,y); i++; y+=24;
|
||||||
txt[i] = new GuiText("Menu artwork");
|
txt[i] = new GuiText("Menu artwork");
|
||||||
txt[i]->SetPosition(60,y); i++;
|
txt[i]->SetPosition(60,y); i++;
|
||||||
txt[i] = new GuiText("the3seashells");
|
txt[i] = new GuiText("the3seashells");
|
||||||
@ -3440,7 +3453,7 @@ static int MenuSettingsOtherMappings()
|
|||||||
bool firstRun = true;
|
bool firstRun = true;
|
||||||
OptionList options;
|
OptionList options;
|
||||||
|
|
||||||
sprintf(options.name[i++], "Enable Turbo Mode");
|
sprintf(options.name[i++], "Turbo Mode");
|
||||||
sprintf(options.name[i++], "Turbo Mode Button");
|
sprintf(options.name[i++], "Turbo Mode Button");
|
||||||
sprintf(options.name[i++], "Menu Toggle");
|
sprintf(options.name[i++], "Menu Toggle");
|
||||||
sprintf(options.name[i++], "Map ABXY to Right Stick");
|
sprintf(options.name[i++], "Map ABXY to Right Stick");
|
||||||
@ -3536,7 +3549,7 @@ static int MenuSettingsOtherMappings()
|
|||||||
switch(GCSettings.TurboModeButton)
|
switch(GCSettings.TurboModeButton)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
sprintf (options.value[1], "Right Stick (default)"); break;
|
sprintf (options.value[1], "Default (Right Stick)"); break;
|
||||||
case 1:
|
case 1:
|
||||||
sprintf (options.value[1], "A"); break;
|
sprintf (options.value[1], "A"); break;
|
||||||
case 2:
|
case 2:
|
||||||
@ -3574,7 +3587,7 @@ static int MenuSettingsOtherMappings()
|
|||||||
case 1:
|
case 1:
|
||||||
sprintf (options.value[2], "Home / Right Stick"); break;
|
sprintf (options.value[2], "Home / Right Stick"); break;
|
||||||
case 2:
|
case 2:
|
||||||
sprintf (options.value[2], "L+R+Start"); break;
|
sprintf (options.value[2], "L+R+Start / 1+2+Plus"); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf (options.value[3], "%s", GCSettings.MapABXYRightStick == 1 ? "On" : "Off");
|
sprintf (options.value[3], "%s", GCSettings.MapABXYRightStick == 1 ? "On" : "Off");
|
||||||
@ -3610,7 +3623,7 @@ static int MenuSettingsVideo()
|
|||||||
sprintf(options.name[i++], "Screen Position");
|
sprintf(options.name[i++], "Screen Position");
|
||||||
sprintf(options.name[i++], "Video Mode");
|
sprintf(options.name[i++], "Video Mode");
|
||||||
sprintf(options.name[i++], "SNES Hi-Res Mode");
|
sprintf(options.name[i++], "SNES Hi-Res Mode");
|
||||||
sprintf(options.name[i++], "Sprites per-line Limit");
|
sprintf(options.name[i++], "Sprites Per-Line Limit");
|
||||||
sprintf(options.name[i++], "Crosshair");
|
sprintf(options.name[i++], "Crosshair");
|
||||||
sprintf(options.name[i++], "Show Framerate");
|
sprintf(options.name[i++], "Show Framerate");
|
||||||
sprintf(options.name[i++], "Show Local Time");
|
sprintf(options.name[i++], "Show Local Time");
|
||||||
@ -3758,7 +3771,7 @@ static int MenuSettingsVideo()
|
|||||||
firstRun = false;
|
firstRun = false;
|
||||||
|
|
||||||
if (GCSettings.render == 0)
|
if (GCSettings.render == 0)
|
||||||
sprintf (options.value[0], "Original");
|
sprintf (options.value[0], "Original (240p)");
|
||||||
else if (GCSettings.render == 1)
|
else if (GCSettings.render == 1)
|
||||||
sprintf (options.value[0], "Filtered");
|
sprintf (options.value[0], "Filtered");
|
||||||
else if (GCSettings.render == 2)
|
else if (GCSettings.render == 2)
|
||||||
@ -3839,6 +3852,7 @@ static int MenuSettingsAudio()
|
|||||||
bool firstRun = true;
|
bool firstRun = true;
|
||||||
OptionList options;
|
OptionList options;
|
||||||
sprintf(options.name[i++], "Interpolation");
|
sprintf(options.name[i++], "Interpolation");
|
||||||
|
sprintf(options.name[i++], "Mute Game Audio");
|
||||||
options.length = i;
|
options.length = i;
|
||||||
for(i=0; i < options.length; i++)
|
for(i=0; i < options.length; i++)
|
||||||
options.value[i][0] = 0;
|
options.value[i][0] = 0;
|
||||||
@ -3890,7 +3904,7 @@ static int MenuSettingsAudio()
|
|||||||
|
|
||||||
switch (ret)
|
switch (ret)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
GCSettings.Interpolation++;
|
GCSettings.Interpolation++;
|
||||||
if (GCSettings.Interpolation > 4) {
|
if (GCSettings.Interpolation > 4) {
|
||||||
GCSettings.Interpolation = 0;
|
GCSettings.Interpolation = 0;
|
||||||
@ -3905,6 +3919,10 @@ static int MenuSettingsAudio()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
S9xReset();
|
S9xReset();
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
GCSettings.MuteAudio ^= 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ret >= 0 || firstRun)
|
if(ret >= 0 || firstRun)
|
||||||
@ -3924,6 +3942,9 @@ static int MenuSettingsAudio()
|
|||||||
case 4:
|
case 4:
|
||||||
sprintf (options.value[0], "None"); break;
|
sprintf (options.value[0], "None"); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sprintf (options.value[1], "%s", GCSettings.MuteAudio ? "On" : "Off");
|
||||||
|
|
||||||
optionBrowser.TriggerUpdate();
|
optionBrowser.TriggerUpdate();
|
||||||
}
|
}
|
||||||
if(backBtn.GetState() == STATE_CLICKED)
|
if(backBtn.GetState() == STATE_CLICKED)
|
||||||
@ -4483,7 +4504,7 @@ static int MenuSettingsMenu()
|
|||||||
if (GCSettings.ExitAction == 1)
|
if (GCSettings.ExitAction == 1)
|
||||||
sprintf (options.value[0], "Return to Wii Menu");
|
sprintf (options.value[0], "Return to Wii Menu");
|
||||||
else if (GCSettings.ExitAction == 2)
|
else if (GCSettings.ExitAction == 2)
|
||||||
sprintf (options.value[0], "Power off Wii");
|
sprintf (options.value[0], "Power Off Wii");
|
||||||
else if (GCSettings.ExitAction == 3)
|
else if (GCSettings.ExitAction == 3)
|
||||||
sprintf (options.value[0], "Return to Loader");
|
sprintf (options.value[0], "Return to Loader");
|
||||||
else
|
else
|
||||||
|
@ -157,6 +157,7 @@ preparePrefsData ()
|
|||||||
createXMLSetting("yshift", "Vertical Video Shift", toStr(GCSettings.yshift));
|
createXMLSetting("yshift", "Vertical Video Shift", toStr(GCSettings.yshift));
|
||||||
createXMLSetting("sfxOverclock", "SuperFX Overclock", toStr(GCSettings.sfxOverclock));
|
createXMLSetting("sfxOverclock", "SuperFX Overclock", toStr(GCSettings.sfxOverclock));
|
||||||
createXMLSetting("Interpolation", "Interpolation", toStr(GCSettings.Interpolation));
|
createXMLSetting("Interpolation", "Interpolation", toStr(GCSettings.Interpolation));
|
||||||
|
createXMLSetting("MuteAudio", "Mute", toStr(GCSettings.MuteAudio));
|
||||||
createXMLSetting("TurboModeEnabled", "Turbo Mode Enabled", toStr(GCSettings.TurboModeEnabled));
|
createXMLSetting("TurboModeEnabled", "Turbo Mode Enabled", toStr(GCSettings.TurboModeEnabled));
|
||||||
createXMLSetting("TurboModeButton", "Turbo Mode Button", toStr(GCSettings.TurboModeButton));
|
createXMLSetting("TurboModeButton", "Turbo Mode Button", toStr(GCSettings.TurboModeButton));
|
||||||
createXMLSetting("GamepadMenuToggle", "Gamepad Menu Toggle", toStr(GCSettings.GamepadMenuToggle));
|
createXMLSetting("GamepadMenuToggle", "Gamepad Menu Toggle", toStr(GCSettings.GamepadMenuToggle));
|
||||||
@ -355,6 +356,7 @@ decodePrefsData ()
|
|||||||
// Audio Settings
|
// Audio Settings
|
||||||
|
|
||||||
loadXMLSetting(&GCSettings.Interpolation, "Interpolation");
|
loadXMLSetting(&GCSettings.Interpolation, "Interpolation");
|
||||||
|
loadXMLSetting(&GCSettings.MuteAudio, "MuteAudio");
|
||||||
|
|
||||||
// Emulation Settings
|
// Emulation Settings
|
||||||
|
|
||||||
@ -516,8 +518,7 @@ DefaultSettings ()
|
|||||||
Settings.SoundInputRate = 31920;
|
Settings.SoundInputRate = 31920;
|
||||||
Settings.DynamicRateControl = true;
|
Settings.DynamicRateControl = true;
|
||||||
Settings.SeparateEchoBuffer = false;
|
Settings.SeparateEchoBuffer = false;
|
||||||
|
GCSettings.MuteAudio = 0;
|
||||||
// Interpolation Method
|
|
||||||
GCSettings.Interpolation = 0;
|
GCSettings.Interpolation = 0;
|
||||||
Settings.InterpolationMethod = DSP_INTERPOLATION_GAUSSIAN;
|
Settings.InterpolationMethod = DSP_INTERPOLATION_GAUSSIAN;
|
||||||
|
|
||||||
|
@ -531,6 +531,7 @@ int main(int argc, char *argv[])
|
|||||||
ScreenshotRequested = 0;
|
ScreenshotRequested = 0;
|
||||||
SwitchAudioMode(0);
|
SwitchAudioMode(0);
|
||||||
|
|
||||||
|
Settings.Mute = GCSettings.MuteAudio;
|
||||||
Settings.SupportHiRes = (GCSettings.HiResolution == 1);
|
Settings.SupportHiRes = (GCSettings.HiResolution == 1);
|
||||||
Settings.MaxSpriteTilesPerLine = (GCSettings.SpriteLimit ? 34 : 128);
|
Settings.MaxSpriteTilesPerLine = (GCSettings.SpriteLimit ? 34 : 128);
|
||||||
Settings.AutoDisplayMessages = (Settings.DisplayFrameRate || Settings.DisplayTime ? true : false);
|
Settings.AutoDisplayMessages = (Settings.DisplayFrameRate || Settings.DisplayTime ? true : false);
|
||||||
|
@ -154,6 +154,7 @@ struct SGCSettings{
|
|||||||
int sfxOverclock;
|
int sfxOverclock;
|
||||||
|
|
||||||
int Interpolation;
|
int Interpolation;
|
||||||
|
int MuteAudio;
|
||||||
|
|
||||||
int TurboModeEnabled; // 0 - disabled, 1 - enabled
|
int TurboModeEnabled; // 0 - disabled, 1 - enabled
|
||||||
int TurboModeButton;
|
int TurboModeButton;
|
||||||
|
Loading…
Reference in New Issue
Block a user