Skip to content

Commit

Permalink
Merge pull request #100 from 4O4/client-console-max-command-length
Browse files Browse the repository at this point in the history
Set max input length in client console
  • Loading branch information
qaisjp committed Dec 28, 2016
2 parents 295c2b4 + 9e36780 commit d97bf8f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Client/core/CConsole.cpp
Expand Up @@ -18,8 +18,10 @@
using SharedUtil::CalcMTASAPath;
using std::string;

#define CONSOLE_HISTORY_LENGTH 128
#define CONSOLE_SIZE 4096
#define CONSOLE_HISTORY_LENGTH 128
#define CONSOLE_SIZE 4096

#define MAX_CONSOLE_COMMAND_LENGTH 255

#define NATIVE_RES_X 1152.0f
#define NATIVE_RES_Y 864.0f
Expand Down Expand Up @@ -49,6 +51,7 @@ CConsole::CConsole ( CGUI* pManager, CGUIElement* pParent )
m_pWindow->SetSizedHandler ( GUI_CALLBACK ( &CConsole::OnWindowSize, this ) );

m_pInput->SetTextAcceptedHandler ( GUI_CALLBACK ( &CConsole::Edit_OnTextAccepted, this ) );
m_pInput->SetMaxLength ( MAX_CONSOLE_COMMAND_LENGTH );

m_pHistory->SetTextChangedHandler ( GUI_CALLBACK ( &CConsole::History_OnTextChanged, this ) );

Expand Down

0 comments on commit d97bf8f

Please sign in to comment.