mirror of https://github.com/snes9xgit/snes9x.git
win32: add mute hotkey
This commit is contained in:
parent
ce5459bc69
commit
14d5dcb0c6
|
@ -706,6 +706,7 @@ int GetNumHotKeysAssignedTo (WORD Key, int modifiers)
|
||||||
if(MATCHES_KEY(Rewind)) count++;
|
if(MATCHES_KEY(Rewind)) count++;
|
||||||
if(MATCHES_KEY(SaveFileSelect)) count++;
|
if(MATCHES_KEY(SaveFileSelect)) count++;
|
||||||
if(MATCHES_KEY(LoadFileSelect)) count++;
|
if(MATCHES_KEY(LoadFileSelect)) count++;
|
||||||
|
if(MATCHES_KEY(Mute)) count++;
|
||||||
|
|
||||||
#undef MATCHES_KEY
|
#undef MATCHES_KEY
|
||||||
}
|
}
|
||||||
|
|
|
@ -1060,6 +1060,7 @@ void WinRegisterConfigItems()
|
||||||
ADD(TurboA); ADD(TurboB); ADD(TurboY); ADD(TurboX); ADD(TurboL); ADD(TurboR); ADD(TurboStart); ADD(TurboSelect); ADD(TurboUp); ADD(TurboDown); ADD(TurboLeft); ADD(TurboRight);
|
ADD(TurboA); ADD(TurboB); ADD(TurboY); ADD(TurboX); ADD(TurboL); ADD(TurboR); ADD(TurboStart); ADD(TurboSelect); ADD(TurboUp); ADD(TurboDown); ADD(TurboLeft); ADD(TurboRight);
|
||||||
ADD(QuitS9X);ADD(Rewind);
|
ADD(QuitS9X);ADD(Rewind);
|
||||||
ADD(SaveFileSelect); ADD(LoadFileSelect);
|
ADD(SaveFileSelect); ADD(LoadFileSelect);
|
||||||
|
ADD(Mute);
|
||||||
#undef ADD
|
#undef ADD
|
||||||
#undef ADDN
|
#undef ADDN
|
||||||
#undef CATEGORY
|
#undef CATEGORY
|
||||||
|
|
|
@ -304,7 +304,7 @@ Nintendo is a trade mark.")
|
||||||
#define HOTKEYS_LABEL_3_10 TEXT("Turbo Up mode")
|
#define HOTKEYS_LABEL_3_10 TEXT("Turbo Up mode")
|
||||||
#define HOTKEYS_LABEL_3_11 TEXT("Turbo Right mode")
|
#define HOTKEYS_LABEL_3_11 TEXT("Turbo Right mode")
|
||||||
#define HOTKEYS_LABEL_3_12 TEXT("Turbo Down mode")
|
#define HOTKEYS_LABEL_3_12 TEXT("Turbo Down mode")
|
||||||
//#define HOTKEYS_LABEL_4_12 "Interpolate Mode 7"
|
#define HOTKEYS_LABEL_3_13 TEXT("Toggle Mute")
|
||||||
#define HOTKEYS_LABEL_4_11 TEXT("Save To File")
|
#define HOTKEYS_LABEL_4_11 TEXT("Save To File")
|
||||||
#define HOTKEYS_LABEL_4_12 TEXT("Load From File")
|
#define HOTKEYS_LABEL_4_12 TEXT("Load From File")
|
||||||
#define HOTKEYS_LABEL_4_13 TEXT("Quit Snes9x")
|
#define HOTKEYS_LABEL_4_13 TEXT("Quit Snes9x")
|
||||||
|
|
|
@ -1312,6 +1312,13 @@ int HandleKeyMessage(WPARAM wParam, LPARAM lParam)
|
||||||
FreezeUnfreezeDialog(FALSE);
|
FreezeUnfreezeDialog(FALSE);
|
||||||
hitHotKey = true;
|
hitHotKey = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wParam == CustomKeys.Mute.key
|
||||||
|
&& modifiers == CustomKeys.Mute.modifiers)
|
||||||
|
{
|
||||||
|
GUI.Mute = !GUI.Mute;
|
||||||
|
hitHotKey = true;
|
||||||
|
}
|
||||||
//if(wParam == CustomKeys.BGLHack.key
|
//if(wParam == CustomKeys.BGLHack.key
|
||||||
//&& modifiers == CustomKeys.BGLHack.modifiers)
|
//&& modifiers == CustomKeys.BGLHack.modifiers)
|
||||||
//{
|
//{
|
||||||
|
@ -8164,7 +8171,7 @@ static void set_hotkeyinfo(HWND hDlg)
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY10,WM_USER+44,CustomKeys.TurboUp.key,CustomKeys.TurboUp.modifiers);
|
SendDlgItemMessage(hDlg,IDC_HOTKEY10,WM_USER+44,CustomKeys.TurboUp.key,CustomKeys.TurboUp.modifiers);
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY11,WM_USER+44,CustomKeys.TurboRight.key,CustomKeys.TurboRight.modifiers);
|
SendDlgItemMessage(hDlg,IDC_HOTKEY11,WM_USER+44,CustomKeys.TurboRight.key,CustomKeys.TurboRight.modifiers);
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY12,WM_USER+44,CustomKeys.TurboDown.key,CustomKeys.TurboDown.modifiers);
|
SendDlgItemMessage(hDlg,IDC_HOTKEY12,WM_USER+44,CustomKeys.TurboDown.key,CustomKeys.TurboDown.modifiers);
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY13,WM_USER+44,0,0);
|
SendDlgItemMessage(hDlg,IDC_HOTKEY13,WM_USER+44, CustomKeys.Mute.key, CustomKeys.Mute.modifiers);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
for(int i = 0 ; i < 10 ; i++)
|
for(int i = 0 ; i < 10 ; i++)
|
||||||
|
@ -8229,7 +8236,7 @@ static void set_hotkeyinfo(HWND hDlg)
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK10,HOTKEYS_LABEL_3_10);
|
SetDlgItemText(hDlg,IDC_LABEL_HK10,HOTKEYS_LABEL_3_10);
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK11,HOTKEYS_LABEL_3_11);
|
SetDlgItemText(hDlg,IDC_LABEL_HK11,HOTKEYS_LABEL_3_11);
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK12,HOTKEYS_LABEL_3_12);
|
SetDlgItemText(hDlg,IDC_LABEL_HK12,HOTKEYS_LABEL_3_12);
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK13,INPUTCONFIG_LABEL_UNUSED);
|
SetDlgItemText(hDlg,IDC_LABEL_HK13, HOTKEYS_LABEL_3_13);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
@ -8400,7 +8407,7 @@ switch(msg)
|
||||||
case IDC_HOTKEY13:
|
case IDC_HOTKEY13:
|
||||||
if(index == 0) CustomKeys.SaveScreenShot.key = wParam, CustomKeys.SaveScreenShot.modifiers = modifiers;
|
if(index == 0) CustomKeys.SaveScreenShot.key = wParam, CustomKeys.SaveScreenShot.modifiers = modifiers;
|
||||||
if(index == 1) CustomKeys.ToggleCheats.key = wParam, CustomKeys.ToggleCheats.modifiers = modifiers;
|
if(index == 1) CustomKeys.ToggleCheats.key = wParam, CustomKeys.ToggleCheats.modifiers = modifiers;
|
||||||
// if(index == 3) CustomKeys.BGLHack.key = wParam, CustomKeys.BGLHack.modifiers = modifiers;
|
if(index == 2) CustomKeys.Mute.key = wParam, CustomKeys.Mute.modifiers = modifiers;
|
||||||
if(index == 3) CustomKeys.QuitS9X.key = wParam, CustomKeys.QuitS9X.modifiers = modifiers;
|
if(index == 3) CustomKeys.QuitS9X.key = wParam, CustomKeys.QuitS9X.modifiers = modifiers;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -498,6 +498,7 @@ struct SCustomKeys {
|
||||||
SCustomKey Rewind;
|
SCustomKey Rewind;
|
||||||
SCustomKey SaveFileSelect;
|
SCustomKey SaveFileSelect;
|
||||||
SCustomKey LoadFileSelect;
|
SCustomKey LoadFileSelect;
|
||||||
|
SCustomKey Mute;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SJoypad {
|
struct SJoypad {
|
||||||
|
|
Loading…
Reference in New Issue