namespace Input {
GameController::GameController(unsigned index):
- priv(new Private),
event_disp(0)
{
- priv->dev = new JsDevice(format("/dev/input/js%d", index));
+ JsDevice *device = new JsDevice(format("/dev/input/js%d", index));
+
+ priv = new Private;
+ priv->dev = device;
priv->dev->signal_data_available.connect(sigc::mem_fun(this, static_cast<void (GameController::*)()>(&GameController::tick)));
name = priv->dev->get_name();
tick(Time::zero);