Hello @leolobato and @Greebo_Edov, do you confirm that you are using the M30 2.4Ghz controller for Sega Megadrive Mini, which comes with an USB dongle (to be used on Sega Mini USB controller port)?
If so, it is interesting because it is supposed to work only wired on the other platforms!
It is hard to find information regarding the M30 controller compatibility, because there are 3 variants on the market.
M30 Bluetooth supporting PC, Android, Switch, Pi, Mac, but with noticeable lag
M30 2.4Ghz for Mini with USB dongle only compatible with Sega Mini (they say), lag-free.
M30 2.4Ghz for original Megadrive with DB9 dongle only compatible with original Megadrive, lag-free.