| 1271 | } |
| 1272 | |
| 1273 | uint16_t RemapPort(const rdcstr &deviceID, uint16_t srcPort) override |
| 1274 | { |
| 1275 | uint16_t portbase = 0; |
| 1276 | |
| 1277 | { |
| 1278 | SCOPED_LOCK(lock); |
| 1279 | auto it = devices.find(deviceID); |
| 1280 | if(it != devices.end()) |
| 1281 | portbase = it->second.portbase; |
| 1282 | } |
| 1283 | |
| 1284 | if(portbase == 0) |
| 1285 | return 0; |
| 1286 | |
| 1287 | if(srcPort == RenderDoc_RemoteServerPort) |
| 1288 | return portbase + RenderDoc_ForwardRemoteServerOffset; |
| 1289 | // we only support a single target control connection on android |
| 1290 | else if(srcPort == RenderDoc_FirstTargetControlPort) |
| 1291 | return portbase + RenderDoc_ForwardTargetControlOffset; |
| 1292 | |
| 1293 | return 0; |
| 1294 | } |
| 1295 | |
| 1296 | IRemoteServer *CreateRemoteServer(Network::Socket *sock, const rdcstr &deviceID) override |
| 1297 | { |
no test coverage detected