Backport Gillou68310 - https://github.com/Gillou68310/mupen64plus-ae/commit/21ef8191cb8eb4edc4cd0d567ead8c4ced822718