mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-22 08:00:35 +00:00
Fix lua imports, fix linux backspace behaviour in console
This commit is contained in:
@@ -25,7 +25,9 @@ add_executable(BeamMP-Server ${source_files})
|
|||||||
target_include_directories(BeamMP-Server PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> ${Boost_INCLUDE_DIRS})
|
target_include_directories(BeamMP-Server PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> ${Boost_INCLUDE_DIRS})
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
target_link_libraries(BeamMP-Server curl lua5.3 krb5 z pthread stdc++fs ${Boost_LINK_DIRS})
|
find_package(Lua 5.3 REQUIRED)
|
||||||
|
target_include_directories(BeamMP-Server PRIVATE ${LUA_INCLUDE_DIR})
|
||||||
|
target_link_libraries(BeamMP-Server curl krb5 z pthread stdc++fs ${Boost_LINK_DIRS} ${LUA_LIBRARIES})
|
||||||
elseif (WIN32)
|
elseif (WIN32)
|
||||||
include(FindLua)
|
include(FindLua)
|
||||||
find_package(CURL CONFIG REQUIRED)
|
find_package(CURL CONFIG REQUIRED)
|
||||||
|
|||||||
@@ -116,14 +116,17 @@ void SetupConsole() {
|
|||||||
HandleInput(CInputBuff);
|
HandleInput(CInputBuff);
|
||||||
CInputBuff.clear();
|
CInputBuff.clear();
|
||||||
}
|
}
|
||||||
} else if (In == 8) {
|
} else if (In == 8 || In == 127) {
|
||||||
if (!CInputBuff.empty())
|
if (!CInputBuff.empty())
|
||||||
CInputBuff.pop_back();
|
CInputBuff.pop_back();
|
||||||
} else if (In == 4) {
|
} else if (In == 4) {
|
||||||
CInputBuff = "exit";
|
CInputBuff = "exit";
|
||||||
HandleInput(CInputBuff);
|
HandleInput(CInputBuff);
|
||||||
CInputBuff.clear();
|
CInputBuff.clear();
|
||||||
|
} else if (!isprint(In)) {
|
||||||
|
// ignore
|
||||||
} else {
|
} else {
|
||||||
|
// info(std::to_string(In));
|
||||||
CInputBuff += char(In);
|
CInputBuff += char(In);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user