Open davidde opened 6 years ago
There is no hard dependency on Raspberry PI in the game logic but you must specify the device file of the input device as sole argument and it must support certain events. If you are using a different kind of device with different kinds of events, you can send me a PR if you manage to get it working.
But here you are getting a permission denied, so I think there's still something else at play...
EDIT: Also, you will have to find an alternative for the display which is now hardcoded to be the unicorn hat hd. We could make this configurable.
Ok, thanks. Will let you know if I happen to find something.
Yes, the display seems to be the problem now. UnicornHatHd::default() on line 67 of unicornhd.rs unwraps on an err value:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "No such file or directory" } }
But I wouldn't know how to fix this ...
The easy workaround is to uncomment the bottom lines in Cargo.toml. It will 'fake' the unicorn hat hd. This is probably not something you want as the final display but it will allow you to run the game in your PC. Not sure what you have in mind as a long term solution... Interested to hear..
Does this also work on non-rpi Linux? I just tried it on Debian, and I got:
But maybe this has to do with the controller used? (I don't have a SNES one, so I tried a steam controller and keyboard ...)