@waitingmoon I've adapted the changes submitted by @Zigurana and eagle0wl and submitted a new PR, which was accepted recently.
If you're using RetroPie, you can install the emulationstation-dev package (from the experimental packages section) and try it out.