Fix error introduced in the Lua function codegen update that accidentally changed some function names

This commit is contained in:
Alexander Bock
2022-03-29 17:31:48 +02:00
parent 49e15f55a0
commit acfb5d76ef
7 changed files with 15 additions and 9 deletions
+3 -1
View File
@@ -70,7 +70,9 @@ namespace {
* value of true is given, then playback will continually loop until it is manually
* stopped.
*/
[[codegen::luawrap]] void startPlaybackDefault(std::string file, bool loop = false) {
[[codegen::luawrap("startPlayback")]] void startPlaybackDefault(std::string file,
bool loop = false)
{
using namespace openspace;
if (file.empty()) {
+7 -3
View File
@@ -218,8 +218,10 @@ joystickAxis(std::string joystickName, int axis)
* Finds the input joystick with the given 'name' and sets the deadzone for a particular
* joystick axis, which means that any input less than this value is completely ignored.
*/
[[codegen::luawrap]] void setJoystickAxisDeadZone(std::string joystickName, int axis,
float deadzone)
[[codegen::luawrap("setAxisDeadZone")]] void setJoystickAxisDeadZone(
std::string joystickName,
int axis,
float deadzone)
{
using namespace openspace;
global::navigationHandler->setJoystickAxisDeadzone(joystickName, axis, deadzone);
@@ -228,7 +230,9 @@ joystickAxis(std::string joystickName, int axis)
/**
* Returns the deadzone for the desired axis of the provided joystick.
*/
[[codegen::luawrap]] float joystickAxisDeadzone(std::string joystickName, int axis) {
[[codegen::luawrap("axisDeadzone")]] float joystickAxisDeadzone(std::string joystickName,
int axis)
{
float deadzone = openspace::global::navigationHandler->joystickAxisDeadzone(
joystickName,
axis
@@ -95,7 +95,7 @@ namespace {
}
// Returns the L2 associativity.
[[codegen::luawrap]] int l2Associativity() {
[[codegen::luawrap("L2Associativity")]] int l2Associativity() {
int assoc = static_cast<int>(CpuCap.L2Associativity());
return assoc;
}
+1 -1
View File
@@ -273,7 +273,7 @@ namespace {
/**
* Returns the current time as an ISO 8601 date string (YYYY-MM-DDTHH:MN:SS).
*/
[[codegen::luawrap]] std::string currentTimeUTC() {
[[codegen::luawrap("UTC")]] std::string currentTimeUTC() {
return std::string(openspace::global::timeManager->time().UTC());
}