diff --git a/changes.txt b/changes.txt index ecab38d..acb8888 100644 --- a/changes.txt +++ b/changes.txt @@ -9,6 +9,8 @@ Version XXX: Bugfix: Fixed segfault in recvfrom when called with NULL addrlen. Update: Log entry and target DLL of stub calls. + + Feature: Added workarounds for Jane's Combat Simulations: WWWII Fighters. Version 0.4.1: Feature: Added workaround for point-to-point links. diff --git a/src/winsock.c b/src/winsock.c index 3aa4c1e..33369a4 100644 --- a/src/winsock.c +++ b/src/winsock.c @@ -1092,6 +1092,33 @@ int WSAAPI setsockopt(SOCKET fd, int level, int optname, const char FAR *optval, { SET_FLAG(IPX_REUSE); } + else if(optname == SO_LINGER && !(sock->flags & IPX_IS_SPX)) + { + /* Setting SO_LINGER only has an effect on + * stream sockets and fails on datagrams, but + * Jane's Combat Simulations: WWWII Fighters + * depends on the call succeeding. + */ + + log_printf(LOG_DEBUG, "Ignoring SO_LINGER on IPX socket %d", sock->fd); + unlock_sockets(); + + return 0; + } + else if(optname == 16399) + { + /* As far as I can tell, this socket option + * isn't defined anywhere and no tested version + * of Windows accepts it on an IPX socket, but + * Jane's Combat Simulations: WWWII Fighters + * uses it and won't work if the call fails. + */ + + log_printf(LOG_DEBUG, "Ignoring unknown SOL_SOCKET option 16399 on socket %d", sock->fd); + unlock_sockets(); + + return 0; + } } unlock_sockets();