@androidonpi The errors appears because you're running RetroPie from the desktop environment. As @dankcushions mentioned, this is not a supported configuration. On the Pi4, drastic will run by starting an X server first (as a few other ports already do), if you're already running in a desktop environment, that won't work.
@mitu yup it seemed to remember the controller when it was the only one plugged in. What I’ve noticed is that the controller is switching to and from JS0 to JS1. I just configured it with the keyboard and it’s JS0 again. I’m wondering if having multiple controllers plugged in at one time might be the issue. I’ll try running Drastic and using just the lone PS4 controller and hopefully it works out!
I'm afraid not at the moment and unfortunately I don't think that is bound to change anytime soon. The DraStic team has had a bit of hard luck, losing key members and even a certain amount of their source code. Right now, the main developer has the all-to-common problem of not having enough time to work on the project. However, there is talk of the existing source being opened up, at which point you'd likely see a lot of revitalized interest and advancement. Perhaps even a libretro core.
I don’t expect nothing in particular, as the two positions - the real one of my finger and the one of the pointer - are completely wrong: if I move, it moves too, but when I am in a corner it starts from the center and so on
That's very telling behavior and explains why the Dolphinbar wasn't recognized. The touchscreen is apparently being read in this case as a standard relative coordinates mouse. If it were being read as an absolute coordinates pointer device, the cursor would snap to wherever it was you touched at. Needless to say, this limitation combined with the wide area required to receive input really hinders precision.