Fix pianoIsInserted always returning false
While looking for piano example code, I noticed [this oddity](https://github.com/CamdenFlannagan/NDS-Audio-Project-1/blob/master/main.c#L255):
```c
// for whatever reason, the piano stuff won't work without checking for the guitar grip first
// oh well.
guitarGripIsInserted();
```
So I put some logging in NitrousTracker (where piano support is currently broken) and found that `pianoIsInserted()` always returns false, _unless_ you call `guitarGripIsInserted()` first.
I looked at the [guitar grip](https://github.com/blocksds/libnds/blob/master/source/arm9/peripherals/guitarGrip.c#L14-L25) module, and saw it not only grants ARM9 access to the GBA cartridge bus but also sets some timing flags which are seemingly important.
I copied this into the piano module, and now `pianoIsInserted()` is working as expected.
合并状态:未合并 2 条评论