I posted a potential solution in the related topic:

https://retropie.org.uk/forum/post/282389