Open hitomi-nakayama opened 11 months ago
This may not be the best solution to the overall issue.
We could additionally warn the user that the lack of haptics support may lead to no controller functionality. Alternatively, we can conditionally enable haptics support for SameBoy compilation, so that SDL initialization will not fail on these systems.
Perhaps it may be more useful to call SDL_InitSubSystem
for each thing we want to init, and report errors for each. The increased granularity then would make the error messages more useful.
The questions then are:
SDL_ShowSimpleMessageBox
, both?
On my system, I had issues with SameBoy detecting my controller, though sound and graphics were working. It turns out that it was because
SDL_Init
was silently failing, as my system's SDL was compiled without support for haptics. (My Gentoo Linux system'slibsdl2
was built without thehaptic
USE flag. After re-installing with thehaptic
flag enabled, my controller worked.)This patch will now give the user this warning:
Couldn't initialize SDL: SDL not built with haptic (force feedback) support
.