mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-10-26 13:59:58 +00:00
Add LiGetPortFlagsFromTerminationErrorCode()
This commit is contained in:
1 parent
6010367637
commit
453c722fa8
2 files changed
+20
-3
No files matched your search
@@ -27,6 +27,20 @@ unsigned int LiGetPortFlagsFromStage(int stage)
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int LiGetPortFlagsFromTerminationErrorCode(int errorCode)
|
||||
{
|
||||
switch (errorCode)
|
||||
{
|
||||
case ML_ERROR_NO_VIDEO_TRAFFIC:
|
||||
// Video is UDP 47998, but we'll also test UDP 48000 because
|
||||
// we don't have an equivalent audio traffic error.
|
||||
return ML_PORT_FLAG_UDP_47998 | ML_PORT_FLAG_UDP_48000;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int LiGetProtocolFromPortFlagIndex(int portFlagIndex)
|
||||
{
|
||||
// The lower byte is reserved for TCP
|
||||
|
||||
Reference in new issue
Block a user