Skip to content

Fix F3 opening host menu#522

Open
Alezito2008 wants to merge 2 commits intosmartcmd:mainfrom
Alezito2008:fix/debug-menu-key
Open

Fix F3 opening host menu#522
Alezito2008 wants to merge 2 commits intosmartcmd:mainfrom
Alezito2008:fix/debug-menu-key

Conversation

@Alezito2008
Copy link
Contributor

Description

Fixed an input conflict where pressing F3 would also trigger the host options menu

Changes

Previous Behavior

Whenever the player pressed F3 to see the debug information, the host options scene would also open simultaneously

Root Cause

The KEY_DEBUG_INFO key was triggering the MINECRAFT_ACTION_GAME_INFO flag causing the host options menu to open

New Behavior

F3 only toggles the on-screen debug info

Fix Implementation

  • Modified KeyboardMouseInput.h to introduce KEY_DEBUG_MENU and mapped it to a separate key (F4), keeping F3 as KEY_DEBUG_INFO.
  • Updated Minecraft.cpp: instead of raising the `MINECRAFT_ACTION_GAME_INFO flag when pressing the debug key, it now correctly raises MINECRAFT_ACTION_RENDER_DEBUG.
  • Removed redundant F4 key handling since this is now handled with player->ullButtonsPressed&(1LL<<MINECRAFT_ACTION_RENDER_DEBUG)

Related Issues

@Alezito2008
Copy link
Contributor Author

f3.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

F3 opens debug menu and host options menu simultaneously

1 participant