mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2025-08-18 10:55:36 +00:00
Fix history on win32 again
This commit is contained in:
parent
5fc6c3ddd7
commit
1bbe88b240
@ -132,7 +132,7 @@ static bool CompositeInputExpected { false };
|
||||
|
||||
static void ProcessCompositeInput() {
|
||||
#ifdef WIN32
|
||||
if (CompositeInput == "H") {
|
||||
} else if (CompositeInput.size() == 1 && memcmp(CompositeInput.data(), std::array<char, 1> { 'H' }.data(), 1) == 0) {
|
||||
#else // unix
|
||||
if (CompositeInput.size() == 2 && memcmp(CompositeInput.data(), std::array<char, 2> { 91, 65 }.data(), 2) == 0) {
|
||||
#endif // WIN32
|
||||
@ -145,12 +145,11 @@ static void ProcessCompositeInput() {
|
||||
CInputBuff = ConsoleHistory.at(ConsoleHistoryReadIndex);
|
||||
}
|
||||
#ifdef WIN32
|
||||
} else if (CompositeInput == "P") {
|
||||
} else if (CompositeInput.size() == 1 && memcmp(CompositeInput.data(), std::array<char, 1> { 'P' }.data(), 1) == 0) {
|
||||
#else // unix
|
||||
} else if (CompositeInput.size() == 2 && memcmp(CompositeInput.data(), std::array<char, 2> { 91, 66 }.data(), 2) == 0) {
|
||||
#endif // WIN32
|
||||
// DOWN ARROW
|
||||
info(std::to_string(ConsoleHistoryReadIndex));
|
||||
if (!ConsoleHistory.empty()) {
|
||||
if (ConsoleHistoryReadIndex != ConsoleHistory.size() - 1) {
|
||||
ConsoleHistoryReadIndex += 1;
|
||||
@ -178,7 +177,7 @@ static void ProcessCompositeInput() {
|
||||
int In = _getch();
|
||||
//info(std::to_string(In));
|
||||
if (CompositeInputExpected) {
|
||||
CompositeInput += In;
|
||||
CompositeInput += char(In);
|
||||
#ifdef WIN32
|
||||
if (CompositeInput.size() == 1) {
|
||||
#else // unix
|
||||
|
Loading…
x
Reference in New Issue
Block a user