Skip to content

Commit 538d3d8

Browse files
melvyn2ReplayCoding
andcommitted
Fix VGui clicks not registering
Co-Authored-By: ReplayCoding <[email protected]>
1 parent 14f1852 commit 538d3d8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/vgui2/vgui_controls/Button.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,10 +688,15 @@ void Button::SetReleasedSound(const char *sound)
688688
}
689689
}
690690

691+
// NOTE(melvyn2) optimization disabled, beacause on gcc alone (not clang) this is wrongly optimized
691692
//-----------------------------------------------------------------------------
692693
// Purpose: Set button to be mouse clickable or not.
693694
//-----------------------------------------------------------------------------
694-
void Button::SetMouseClickEnabled(MouseCode code,bool state)
695+
void
696+
#ifdef LINUX
697+
__attribute__((optimize("O0")))
698+
#endif
699+
Button::SetMouseClickEnabled(MouseCode code,bool state)
695700
{
696701
if(state)
697702
{

0 commit comments

Comments
 (0)