問題如下:
Error: Could not initialize SDL sensor subsystem (SDL not built with sensor support) stack traceback: [love "boot.lua"]:431: in function <[love "boot.lua"]:427> [C]: at 0xb6aa7850 [C]: in function 'require' [love "boot.lua"]:326: in function <[love "boot.lua"]:154> [C]: in function 'xpcall' [love "boot.lua"]:441: in function <[love "boot.lua"]:434> [C]: in function 'xpcall'
解法如下:
Sensor::Sensor() : love::sensor::Sensor("love.sensor.sdl") , sensors() { //if (SDL_InitSubSystem(SDL_INIT_SENSOR) < 0) //throw love::Exception("Could not initialize SDL sensor subsystem (%s)", SDL_GetError()); } Sensor::~Sensor() { //SDL_QuitSubSystem(SDL_INIT_SENSOR); }