Skip to content

Commit 60c98a6

Browse files
authored
Merge pull request #19883 from hrydgard/pause-without-menu
Add new mappable key to pause without the pause menu.
2 parents 7a0ec74 + e19705d commit 60c98a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+59
-0
lines changed

Core/KeyMap.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,8 @@ const KeyMap_IntStrPair psp_button_names[] = {
419419

420420
{VIRTKEY_FASTFORWARD, "Fast-forward"},
421421
{VIRTKEY_PAUSE, "Pause"},
422+
{VIRTKEY_PAUSE_NO_MENU, "Pause (no menu)"},
423+
422424
{VIRTKEY_SPEED_TOGGLE, "SpeedToggle"},
423425
{VIRTKEY_SPEED_CUSTOM1, "Alt speed 1"},
424426
{VIRTKEY_SPEED_CUSTOM2, "Alt speed 2"},

Core/KeyMap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ enum {
7878
VIRTKEY_TOGGLE_TOUCH_CONTROLS = 0x40000031,
7979
VIRTKEY_RESET_EMULATION = 0x40000032,
8080
VIRTKEY_TOGGLE_DEBUGGER = 0x40000033,
81+
VIRTKEY_PAUSE_NO_MENU = 0x40000034,
8182
VIRTKEY_LAST,
8283
VIRTKEY_COUNT = VIRTKEY_LAST - VIRTKEY_FIRST
8384
};

UI/EmuScreen.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,20 @@ void EmuScreen::onVKey(int virtualKeyCode, bool down) {
742742
}
743743
break;
744744

745+
case VIRTKEY_PAUSE_NO_MENU:
746+
if (down && !NetworkWarnUserIfOnlineAndCantSpeed()) {
747+
// We re-use debug break/resume to implement pause/resume without a menu.
748+
if (coreState == CORE_STEPPING_CPU) {
749+
Core_Resume();
750+
} else {
751+
Core_Break("user-pause");
752+
}
753+
}
754+
break;
755+
745756
case VIRTKEY_FRAME_ADVANCE:
746757
// Can't do this reliably in an async fashion, so we just set a variable.
758+
// Is this used by anyone? There's no good way to resume, other than PAUSE_NO_MENU or the debugger.
747759
if (down && !NetworkWarnUserIfOnlineAndCantSpeed()) {
748760
doFrameAdvance_.store(true);
749761
}

assets/lang/ar_AE.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,7 @@ Next Slot = Next slot
831831
None = None
832832
Note = Note
833833
OpenChat = فتح المحادثة
834+
Pause (no menu) = ‎توقف مؤقت
834835
Pause = ‎توقف مؤقت
835836
Previous Slot = Previous Slot
836837
R = R

assets/lang/az_AZ.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ Next Slot = Next Slot
823823
None = None
824824
Note = Note
825825
OpenChat = Open chat
826+
Pause (no menu) = Pause (no menu)
826827
Pause = Pause
827828
Previous Slot = Previous Slot
828829
R = R

assets/lang/bg_BG.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ Next Slot = Next Slot
823823
None = None
824824
Note = Note
825825
OpenChat = Open chat
826+
Pause (no menu) = Пауза (no menu)
826827
Pause = Пауза
827828
Previous Slot = Previous Slot
828829
R = R

assets/lang/ca_ES.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ Next Slot = Next Slot
823823
None = None
824824
Note = Note
825825
OpenChat = Open chat
826+
Pause (no menu) = Pause (no menu)
826827
Pause = Pause
827828
Previous Slot = Previous Slot
828829
R = R

assets/lang/cz_CZ.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ Next Slot = Další pozice
823823
None = None
824824
Note = Note
825825
OpenChat = Open chat
826+
Pause (no menu) = Pauza (no menu)
826827
Pause = Pauza
827828
Previous Slot = Previous Slot
828829
R = R

assets/lang/da_DK.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ Next Slot = Næste Slot
823823
None = None
824824
Note = Note
825825
OpenChat = Open chat
826+
Pause (no menu) = Pause (no menu)
826827
Pause = Pause
827828
Previous Slot = Previous Slot
828829
R = R

assets/lang/de_DE.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ Next Slot = Nächster Stand
823823
None = None
824824
Note = Note
825825
OpenChat = Open chat
826+
Pause (no menu) = Pause (no menu)
826827
Pause = Pause
827828
Previous Slot = Previous Slot
828829
R = R

0 commit comments

Comments
 (0)