From 4f491cba6fcb02f105e88360bff6a80e8a8cccc7 Mon Sep 17 00:00:00 2001 From: qndel Date: Sun, 3 Apr 2022 22:51:47 +0200 Subject: [PATCH] allow remapping P for pause and always treat pause button as pause --- Source/diablo.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 519147172..640b6cc65 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -445,6 +445,10 @@ void ClosePanels() void PressKey(int vkey) { + if (vkey == DVL_VK_PAUSE) { + diablo_pause_game(); + return; + } if (gmenu_presskeys(vkey) || control_presskeys(vkey)) { return; } @@ -558,10 +562,6 @@ void PressChar(char vkey) if (gmenu_is_active() || IsTalkActive() || sgnTimeoutCurs != CURSOR_NONE || MyPlayerIsDead) { return; } - if (vkey == 'p' || vkey == 'P') { - diablo_pause_game(); - return; - } if (PauseMode == 2) { return; } @@ -1612,7 +1612,7 @@ void InitKeymapActions() "Pause Game", N_("Pause Game"), N_("Pauses the game."), - DVL_VK_PAUSE, + 'P', diablo_pause_game); sgOptions.Keymapper.AddAction( "DecreaseGamma",