mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-21 15:40:33 +00:00
Fix backspace behavior, random printing of >
This commit is contained in:
@@ -31,6 +31,7 @@ void HandleInput(const std::string& cmd){
|
|||||||
void ProcessOut(){
|
void ProcessOut(){
|
||||||
static size_t len = 2;
|
static size_t len = 2;
|
||||||
if(QConsoleOut.empty() && len == CInputBuff.length())return;
|
if(QConsoleOut.empty() && len == CInputBuff.length())return;
|
||||||
|
printf("%c[2K\r", 27);
|
||||||
for(const std::string& msg : QConsoleOut)
|
for(const std::string& msg : QConsoleOut)
|
||||||
if(!msg.empty())std::cout << msg;
|
if(!msg.empty())std::cout << msg;
|
||||||
MLock.lock();
|
MLock.lock();
|
||||||
@@ -120,7 +121,6 @@ void SetupConsole(){
|
|||||||
HandleInput(CInputBuff);
|
HandleInput(CInputBuff);
|
||||||
CInputBuff.clear();
|
CInputBuff.clear();
|
||||||
}else {
|
}else {
|
||||||
printf("%c[2K\r", 27);
|
|
||||||
CInputBuff += char(In);
|
CInputBuff += char(In);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user