Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rumble and Path Fix #7

Merged
merged 2 commits into from
Apr 11, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
patch path issue
  • Loading branch information
Moros1138 committed Apr 11, 2021
commit ea01c36f5b8ebdde36a9d4ad225f575f153da76e
4 changes: 2 additions & 2 deletions olcPGEX_Gamepad.h
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ void olc::GamePad::updateGamepads() {
const inotify_event *event = reinterpret_cast<inotify_event *>(buf);

if (event->mask & IN_CREATE) {
std::string path = "/dev/input" + std::string{event->name};
std::string path = "/dev/input/" + std::string{event->name};

GamePad *gp = openGamepad(path);

Expand All @@ -1028,7 +1028,7 @@ void olc::GamePad::enumerateGamepads() {
DIR *dir = opendir("/dev/input");

for (dirent *elem = readdir(dir); elem != nullptr; elem = readdir(dir)) {
std::string path = "/dev/input" + std::string{elem->d_name};
std::string path = "/dev/input/" + std::string{elem->d_name};
bool found = false;
for (auto &gamepad : gamepads) {
if (gamepad->path == path) {
Expand Down