Allow changing connection type without restart.

Before, if we tried changing the connection type without closing vbam,
we would get an error about a connection already existing. We needed
to restart vbam to change it.
This commit is contained in:
Edênis Freindorfer Azevedo 2020-05-19 14:36:52 -03:00
parent d379a076df
commit bd2483cae7
No known key found for this signature in database
GPG Key ID: 968FB6EC280C7222
1 changed files with 12 additions and 0 deletions

View File

@ -3097,21 +3097,33 @@ EVT_HANDLER_MASK(LanLink, "Start Network link", CMDEN_LINK_ANY)
EVT_HANDLER(LinkType0Nothing, "Link nothing")
{
#ifndef NO_LINK
CloseLink();
#endif
SetLinkTypeMenu("LinkType0Nothing", 0);
}
EVT_HANDLER(LinkType1Cable, "Link cable")
{
#ifndef NO_LINK
CloseLink();
#endif
SetLinkTypeMenu("LinkType1Cable", 1);
}
EVT_HANDLER(LinkType2Wireless, "Link wireless")
{
#ifndef NO_LINK
CloseLink();
#endif
SetLinkTypeMenu("LinkType2Wireless", 2);
}
EVT_HANDLER(LinkType3GameCube, "Link GameCube")
{
#ifndef NO_LINK
CloseLink();
#endif
SetLinkTypeMenu("LinkType3GameCube", 3);
}