Closed bmarwell closed 3 years ago
The split('=') will cut your weird hostname and will still only contains remoteName
The split('=') will cut your weird hostname and will still only contains remoteName
I do not get it, what do you mean? Please annotate the corresponding line in the PR.
RetroArchHosts="remoteName=docker"
If I split on =
I get a QStringList with RetroArchHosts
| "remoteName
| docker"
Then your existing code would also be erroneous. The variable "host" does not contain the full line, only remoteName=docker
. Hence the split works as expected (and did in your version, too).
See:
https://github.com/bmarwell/QUsb2snes/commit/be4b01376d968e7071805d413489c305c0266e93#diff-78fee45624acc367fd0e8fc2e8fef07db1136cd6ccc57522719266db54f04a26L54-L56
BTW, you might want to add a unit test for this method :)
Hi,
if I pass a host name to the config, retroarch will add an empty QHostAddress:
how to reproduce
expected output
2021-04-12T07:38:24 RA Factory - Debug: Trying to connect to New RetroArch "remoteName" QHostAddress("host.docker.internal")
actual output
2021-04-12T07:38:24 RA Factory - Debug: Trying to connect to New RetroArch "remoteName" QHostAddress("")
problematic line
https://github.com/Skarsnik/QUsb2snes/blob/a4248c38d30745f0339c1cc854697cb6b95ba3bb/devices/retroarchfactory.cpp#L53-L59
Note: the assignment of a string to QHostAddress won’t work here as it expects an IP.
suggested solution
I am not a C++ programmer, BUT according to the docs something like this (pseudocode) should work:
I think this should also work with IPs.