mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #3260
3260: "Connect to" popup: Don't disconnect on enter (fixes #3259) r=Jupeyy a=def- ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [x] Considered possible null pointers and out of bounds array indexing - [x] Changed no physics that affect existing maps - [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
commit
612c592ef2
|
@ -1605,7 +1605,7 @@ int CMenus::Render()
|
|||
Part.VMargin(120.0f, &Part);
|
||||
|
||||
static int s_Button = 0;
|
||||
if(DoButton_Menu(&s_Button, pButtonText, 0, &Part) || m_EscapePressed || m_EnterPressed)
|
||||
if(DoButton_Menu(&s_Button, pButtonText, 0, &Part) || m_EscapePressed || (m_EnterPressed && m_Popup != POPUP_CONNECTING))
|
||||
{
|
||||
Client()->Disconnect();
|
||||
m_Popup = POPUP_NONE;
|
||||
|
|
Loading…
Reference in a new issue