X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Flinux%2Fgamecontroller.cpp;h=58e4ef17325d2aa8d3b0a22447ccae4b30ac86da;hb=24da3e62cf22663ef16b61b9510fbac49308f756;hp=d0029e8fe3c4bbad1249bb4fdcea6b1baca1d7b6;hpb=d828ade4727b8eedc4f8adf82b50196d17f2f58b;p=libs%2Fgui.git diff --git a/source/input/linux/gamecontroller.cpp b/source/input/linux/gamecontroller.cpp index d0029e8..58e4ef1 100644 --- a/source/input/linux/gamecontroller.cpp +++ b/source/input/linux/gamecontroller.cpp @@ -46,9 +46,9 @@ unsigned GameController::detect() FS::Path dev_input = "/dev/input"; vector devices = FS::list_filtered(dev_input, "^js[0-9]+"); sort(devices); - for(vector::const_iterator i=devices.begin(); i!=devices.end(); ++i) + for(const string &f: devices) // TODO check permissions - Private::detected_controllers.push_back((dev_input / *i).str()); + Private::detected_controllers.push_back((dev_input/f).str()); detect_done = true; n_detected_controllers = Private::detected_controllers.size();