diff --git a/project/include/Display.h b/project/include/Display.h index 5b069a127..d5e2bfe26 100644 --- a/project/include/Display.h +++ b/project/include/Display.h @@ -437,7 +437,7 @@ public: virtual void setMultitouchActive(bool inActive) { } virtual bool getMultitouchActive() { return false; } - virtual const char *getJoystickName(int id) { return ""; } + virtual const char *getJoystickName(int id) { return NULL; } Matrix GetFullMatrix(bool inStageScaling); bool FinishEditOnEnter(); diff --git a/project/src/common/ExternalInterface.cpp b/project/src/common/ExternalInterface.cpp index 6b1c773ce..4292daafe 100644 --- a/project/src/common/ExternalInterface.cpp +++ b/project/src/common/ExternalInterface.cpp @@ -1267,7 +1267,7 @@ value lime_stage_get_joystick_name(value inStage, value inId) if (AbstractToObject(inStage,stage)) { const char *joystickName = stage->getJoystickName(val_int(inId)); - return alloc_string(joystickName); + if (joystickName != NULL) return alloc_string(joystickName); } #endif return alloc_null();