Closed Dwedit closed 6 years ago
OK, I assume the way you made this, if a frontend doesn't implement this feature, it will still work like before, right?
Yep.
int result = -1;
bool okay = environ_cb(RETRO_ENVIRONMENT_GET_AUDIO_VIDEO_ENABLE, &result);
if (!okay) result |= 3;
bool audioEnabled = 0 != (result & 2);
bool videoEnabled = 0 != (result & 1);
IPPU.RenderThisFrame = videoEnabled;
S9xSetSoundMute(!audioEnabled);
The "okay" return value determines if the frontend supports this feature or not. So for that code, I'm just ORing with 3 (setting audio enable and video enable bits).
OK, looks very promising then. Let's merge it.
This changeset adds these features: