mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
controls: fix console opening when remapping its key (#2683)
Resolves #2641.
This commit is contained in:
parent
0939b6b384
commit
2adaf2ac0f
6 changed files with 11 additions and 2 deletions
|
@ -32,6 +32,7 @@
|
||||||
- fixed the embedded bats fix causing problems inside rooms with trapdoors (regression from 4.6)
|
- fixed the embedded bats fix causing problems inside rooms with trapdoors (regression from 4.6)
|
||||||
- fixed cutscene music looping (#2591, regression from 4.8)
|
- fixed cutscene music looping (#2591, regression from 4.8)
|
||||||
- fixed saves created before version 2.15 causing a crash on load (#2654, regression from 4.8)
|
- fixed saves created before version 2.15 causing a crash on load (#2654, regression from 4.8)
|
||||||
|
- fixed the console opening when remapping its key (#2641)
|
||||||
- removed perspective filter toggle (it had no effect; repurposed to trapezoid interpolation toggle)
|
- removed perspective filter toggle (it had no effect; repurposed to trapezoid interpolation toggle)
|
||||||
- improved camera mode navigation:
|
- improved camera mode navigation:
|
||||||
- improved support for pivoting
|
- improved support for pivoting
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
- added the ability for custom levels to have up to two of each secret type per level (#2674)
|
- added the ability for custom levels to have up to two of each secret type per level (#2674)
|
||||||
- fixed the final two levels not allowing for secrets to be counted in the statistics (#1582)
|
- fixed the final two levels not allowing for secrets to be counted in the statistics (#1582)
|
||||||
- fixed Lara's holsters being empty if a game flow level removes all weapons but also re-adds the pistols (#2677)
|
- fixed Lara's holsters being empty if a game flow level removes all weapons but also re-adds the pistols (#2677)
|
||||||
|
- fixed the console opening when remapping its key (#2641)
|
||||||
- removed the need to specify in the game flow levels that have no secrets (secrets will be automatically counted) (#1582)
|
- removed the need to specify in the game flow levels that have no secrets (secrets will be automatically counted) (#1582)
|
||||||
|
|
||||||
## [0.10](https://github.com/LostArtefacts/TRX/compare/tr2-0.9.2...tr2-0.10) - 2025-03-18
|
## [0.10](https://github.com/LostArtefacts/TRX/compare/tr2-0.9.2...tr2-0.10) - 2025-03-18
|
||||||
|
|
|
@ -620,6 +620,11 @@ static void M_CheckUnbindKey(INPUT_BACKEND backend, INPUT_LAYOUT layout)
|
||||||
m_Text[TEXT_UNBIND], &m_ProgressBars[M_PROGERSS_BAR_UNBIND], progress);
|
m_Text[TEXT_UNBIND], &m_ProgressBars[M_PROGERSS_BAR_UNBIND], progress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Option_Controls_IsKeyChangeMode(void)
|
||||||
|
{
|
||||||
|
return m_KeyMode == KM_CHANGE || m_KeyMode == KM_CHANGEKEYUP;
|
||||||
|
}
|
||||||
|
|
||||||
CONTROL_MODE Option_Controls_Control(
|
CONTROL_MODE Option_Controls_Control(
|
||||||
INVENTORY_ITEM *inv_item, const bool is_busy, INPUT_BACKEND backend)
|
INVENTORY_ITEM *inv_item, const bool is_busy, INPUT_BACKEND backend)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,6 +10,7 @@ typedef enum {
|
||||||
CM_CONTROLLER,
|
CM_CONTROLLER,
|
||||||
} CONTROL_MODE;
|
} CONTROL_MODE;
|
||||||
|
|
||||||
|
bool Option_Controls_IsKeyChangeMode(void);
|
||||||
CONTROL_MODE Option_Controls_Control(
|
CONTROL_MODE Option_Controls_Control(
|
||||||
INVENTORY_ITEM *inv_item, bool is_busy, INPUT_BACKEND backend);
|
INVENTORY_ITEM *inv_item, bool is_busy, INPUT_BACKEND backend);
|
||||||
void Option_Controls_Draw(INVENTORY_ITEM *inv_item, INPUT_BACKEND backend);
|
void Option_Controls_Draw(INVENTORY_ITEM *inv_item, INPUT_BACKEND backend);
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "game/fmv.h"
|
#include "game/fmv.h"
|
||||||
#include "game/input.h"
|
#include "game/input.h"
|
||||||
#include "game/music.h"
|
#include "game/music.h"
|
||||||
|
#include "game/option/option_controls.h"
|
||||||
#include "game/output.h"
|
#include "game/output.h"
|
||||||
#include "game/shell.h"
|
#include "game/shell.h"
|
||||||
#include "game/sound.h"
|
#include "game/sound.h"
|
||||||
|
@ -181,7 +182,7 @@ void Shell_ProcessEvents(void)
|
||||||
// some keypresses if the player types really fast, so we need to
|
// some keypresses if the player types really fast, so we need to
|
||||||
// react sooner.
|
// react sooner.
|
||||||
if (!FMV_IsPlaying() && g_Config.gameplay.enable_console
|
if (!FMV_IsPlaying() && g_Config.gameplay.enable_console
|
||||||
&& !Console_IsOpened()
|
&& !Console_IsOpened() && !Option_Controls_IsKeyChangeMode()
|
||||||
&& Input_IsPressed(
|
&& Input_IsPressed(
|
||||||
INPUT_BACKEND_KEYBOARD, g_Config.input.keyboard_layout,
|
INPUT_BACKEND_KEYBOARD, g_Config.input.keyboard_layout,
|
||||||
INPUT_ROLE_ENTER_CONSOLE)) {
|
INPUT_ROLE_ENTER_CONSOLE)) {
|
||||||
|
|
|
@ -238,7 +238,7 @@ static void M_HandleKeyDown(const SDL_Event *const event)
|
||||||
// some keypresses if the player types really fast, so we need to
|
// some keypresses if the player types really fast, so we need to
|
||||||
// react sooner.
|
// react sooner.
|
||||||
if (!FMV_IsPlaying() && g_Config.gameplay.enable_console
|
if (!FMV_IsPlaying() && g_Config.gameplay.enable_console
|
||||||
&& !Console_IsOpened()
|
&& !Console_IsOpened() && !Input_IsInListenMode()
|
||||||
&& Input_IsPressed(
|
&& Input_IsPressed(
|
||||||
INPUT_BACKEND_KEYBOARD, g_Config.input.keyboard_layout,
|
INPUT_BACKEND_KEYBOARD, g_Config.input.keyboard_layout,
|
||||||
INPUT_ROLE_ENTER_CONSOLE)) {
|
INPUT_ROLE_ENTER_CONSOLE)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue