Merge pull request #12643 from iota97/mute-button

Toggle mute button
This commit is contained in:
Henrik Rydgård 2020-02-25 13:29:45 +01:00 committed by GitHub
commit 4602f896a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -698,6 +698,7 @@ const KeyMap_IntStrPair psp_button_names[] = {
{VIRTKEY_TEXTURE_DUMP, "Texture Dumping"},
{VIRTKEY_TEXTURE_REPLACE, "Texture Replacement"},
{VIRTKEY_SCREENSHOT, "Screenshot"},
{VIRTKEY_MUTE_TOGGLE, "Mute toggle"},
{CTRL_HOME, "Home"},
{CTRL_HOLD, "Hold"},

View File

@ -57,6 +57,7 @@ enum {
VIRTKEY_TEXTURE_DUMP = 0x40000019,
VIRTKEY_TEXTURE_REPLACE = 0x4000001A,
VIRTKEY_SCREENSHOT = 0x4000001B,
VIRTKEY_MUTE_TOGGLE = 0x4000001C,
VIRTKEY_LAST,
VIRTKEY_COUNT = VIRTKEY_LAST - VIRTKEY_FIRST
};

View File

@ -631,6 +631,9 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) {
case VIRTKEY_RAPID_FIRE:
__CtrlSetRapidFire(true);
break;
case VIRTKEY_MUTE_TOGGLE:
g_Config.bEnableSound = !g_Config.bEnableSound;
break;
}
}