Moved minimaid linking command to proper place in src/CMakeLists.txt. Removed wrapper function pointers from LightsDriver_LinuxMinimaid.h because it doesn't load a dynamic lib. Link udev when linking libmmmagic.
This commit is contained in:
Vendored
-3
@@ -14,9 +14,6 @@ endif()
|
||||
if (NOT SYSTEM_PCRE_FOUND)
|
||||
include(CMakeProject-pcre.cmake)
|
||||
endif()
|
||||
if (LINUX)
|
||||
include(CMakeProject-mmmagic.cmake)
|
||||
endif()
|
||||
include(CMakeProject-tomcrypt.cmake)
|
||||
include(CMakeProject-tommath.cmake)
|
||||
include(CMakeProject-png.cmake)
|
||||
|
||||
Vendored
+2
@@ -3,10 +3,12 @@ if(LINUX)
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
list(APPEND SMDATA_LINK_LIB
|
||||
"${SM_EXTERN_DIR}/libmmmagic/linux-64bit/libmmmagic.a"
|
||||
"udev"
|
||||
)
|
||||
else()
|
||||
list(APPEND SMDATA_LINK_LIB
|
||||
"${SM_EXTERN_DIR}/libmmmagic/linux-32bit/libmmmagic.a"
|
||||
"udev"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -331,6 +331,7 @@ list(APPEND SMDATA_LINK_LIB
|
||||
"glew"
|
||||
"jpeg"
|
||||
)
|
||||
include(../extern/CMakeProject-mmmagic.cmake)
|
||||
|
||||
if (HAS_MP3)
|
||||
list(FIND SMDATA_LINK_LIB "jsoncpp" JSON_INDEX)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// LightsDriver_Win32Minimaid - driver for lights on the Minimaid with libmmmagic
|
||||
// LightsDriver_LinuxMinimaid - driver for lights on the Minimaid with libmmmagic
|
||||
/* To use, StepMania must be run with root permissions, or udev rule for the
|
||||
* device must be made something like this (but it's not quite right):
|
||||
* echo SUBSYSTEM==\"usb\", ATTR{idVendor}==\"beef\", ATTR{idProduct}==\"5730\", MODE=\"0666\" > /etc/udev/rules.d/50-minimaid
|
||||
@@ -6,11 +6,14 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "LightsDriver_LinuxMinimaid.h"
|
||||
#include "../../../extern/libmmmagic/mmmagic.h"
|
||||
|
||||
REGISTER_LIGHTS_DRIVER_CLASS( LinuxMinimaid );
|
||||
|
||||
LightsDriver_LinuxMinimaid::LightsDriver_LinuxMinimaid()
|
||||
{
|
||||
// libmmmagic is actually statically linked in, so there's no wrapper
|
||||
// initializing to do. -Kyz
|
||||
_mmmagic_loaded= true;
|
||||
mm_connect_minimaid();
|
||||
mm_setKB(true);
|
||||
@@ -18,7 +21,8 @@ LightsDriver_LinuxMinimaid::LightsDriver_LinuxMinimaid()
|
||||
|
||||
LightsDriver_LinuxMinimaid::~LightsDriver_LinuxMinimaid()
|
||||
{
|
||||
|
||||
// libmmmagic is actually statically linked in, so there's no wrapper
|
||||
// destruction to do. -Kyz
|
||||
}
|
||||
|
||||
void LightsDriver_LinuxMinimaid::Set(LightsState const* ls)
|
||||
|
||||
@@ -25,43 +25,6 @@
|
||||
|
||||
static bool _mmmagic_loaded=false;
|
||||
|
||||
typedef bool (*__BITVALID)(int);
|
||||
static __BITVALID __bitValid;
|
||||
|
||||
// minimaid prototypes
|
||||
typedef void (*MM_SETDDRPAD1LIGHT)(int, int);
|
||||
typedef void (*MM_SETDDRPAD2LIGHT)(int, int);
|
||||
typedef void (*MM_SETCABINETLIGHT)(int, int);
|
||||
typedef void (*MM_SETDDRBASSLIGHT)(int, int);
|
||||
static MM_SETDDRPAD1LIGHT mm_setDDRPad1Light;
|
||||
static MM_SETDDRPAD2LIGHT mm_setDDRPad2Light;
|
||||
static MM_SETCABINETLIGHT mm_setDDRCabinetLight;
|
||||
static MM_SETDDRBASSLIGHT mm_setDDRBassLight;
|
||||
|
||||
typedef bool (*MM_CONNECT_MINIMAID)();
|
||||
typedef bool (*MM_SETKB)(bool val);
|
||||
static MM_CONNECT_MINIMAID mm_connect_minimaid;
|
||||
static MM_SETKB mm_setKB;
|
||||
|
||||
typedef void (*MM_SETDDRALLON)();
|
||||
typedef void (*MM_SETDDRALLOFF)();
|
||||
static MM_SETDDRALLON mm_setDDRAllOn;
|
||||
static MM_SETDDRALLOFF mm_setDDRAllOff;
|
||||
|
||||
typedef void (*MM_SETBLUELED)(unsigned char);
|
||||
typedef void (*MM_SETMMOUTPUTREPORTS)(unsigned char, unsigned char, unsigned char, unsigned char);
|
||||
typedef bool (*MM_SENDDDRMINIMAIDUPDATE)();
|
||||
static MM_SETBLUELED mm_setBlueLED;
|
||||
static MM_SETMMOUTPUTREPORTS mm_setMMOutputReports;
|
||||
static MM_SENDDDRMINIMAIDUPDATE mm_sendDDRMiniMaidUpdate;
|
||||
|
||||
typedef void (*MM_INIT)();
|
||||
typedef void (*MM_TURNON)(unsigned char, int);
|
||||
typedef bool (*MM_TURNOFF)(unsigned char, int);
|
||||
static MM_INIT mm_init;
|
||||
static MM_TURNON mm_turnON;
|
||||
static MM_TURNOFF mm_turnOFF;
|
||||
|
||||
class LightsDriver_LinuxMinimaid : public LightsDriver
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user