skmp / reicast-emulator

Reicast was a multiplatform Sega Dreamcast emulator
https://reicast.emudev.org
Other
1.1k stars 346 forks source link

Fixed crash when updating controller settings #1908

Closed einsteinx2 closed 4 years ago

einsteinx2 commented 4 years ago

This was happening any time the emulator wasn't running yet. For example after first launching Reicast then setting up your controllers. From what I can tell, it would happen on all platforms, not just MacOS, though I've confirmed it's fixed there.

The actual fix is just the null check in the maple_ReconnectDevices() function. I added a similar null check in maple_vblank() just to be safe.

skmp commented 4 years ago

We need to refactor a bit some stuff so these corner cases don't happen. Someday.