mirror of
https://github.com/libretro/libretro-tyrquake.git
synced 2024-11-27 02:00:41 +00:00
net: get rid of MAX_NET_DRIVERS
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
c952c109b7
commit
5863bcf793
5
NQ/net.h
5
NQ/net.h
@ -183,9 +183,8 @@ typedef struct net_landriver_s {
|
||||
int (*SetSocketPort)(netadr_t *addr, int port);
|
||||
} net_landriver_t;
|
||||
|
||||
#define MAX_NET_DRIVERS 8
|
||||
extern int net_numlandrivers;
|
||||
extern net_landriver_t net_landrivers[MAX_NET_DRIVERS];
|
||||
extern net_landriver_t net_landrivers[];
|
||||
|
||||
typedef struct net_driver_s {
|
||||
char *name;
|
||||
@ -206,7 +205,7 @@ typedef struct net_driver_s {
|
||||
} net_driver_t;
|
||||
|
||||
extern int net_numdrivers;
|
||||
extern net_driver_t net_drivers[MAX_NET_DRIVERS];
|
||||
extern net_driver_t net_drivers[];
|
||||
|
||||
extern int DEFAULTnet_hostport;
|
||||
extern int net_hostport;
|
||||
|
@ -23,9 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#include "net_loop.h"
|
||||
#include "net_udp.h"
|
||||
|
||||
#include "quakedef.h"
|
||||
|
||||
net_driver_t net_drivers[MAX_NET_DRIVERS] = {
|
||||
net_driver_t net_drivers[] = {
|
||||
{
|
||||
.name = "Loopback",
|
||||
.initialized = false,
|
||||
@ -61,7 +59,7 @@ net_driver_t net_drivers[MAX_NET_DRIVERS] = {
|
||||
|
||||
int net_numdrivers = 2;
|
||||
|
||||
net_landriver_t net_landrivers[MAX_NET_DRIVERS] = {
|
||||
net_landriver_t net_landrivers[] = {
|
||||
{
|
||||
.name = "UDP",
|
||||
.initialized = false,
|
||||
|
@ -17,28 +17,29 @@ along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
#include "quakedef.h"
|
||||
|
||||
#include "net.h"
|
||||
#include "net_loop.h"
|
||||
|
||||
net_driver_t net_drivers[MAX_NET_DRIVERS] = {
|
||||
net_driver_t net_drivers[] = {
|
||||
{
|
||||
"Loopback",
|
||||
false,
|
||||
Loop_Init,
|
||||
Loop_Listen,
|
||||
Loop_SearchForHosts,
|
||||
Loop_Connect,
|
||||
Loop_CheckNewConnections,
|
||||
Loop_GetMessage,
|
||||
Loop_SendMessage,
|
||||
Loop_SendUnreliableMessage,
|
||||
Loop_CanSendMessage,
|
||||
Loop_CanSendUnreliableMessage,
|
||||
Loop_Close,
|
||||
Loop_Shutdown}
|
||||
.name = "Loopback",
|
||||
.initialized = false,
|
||||
.Init = Loop_Init,
|
||||
.Listen = Loop_Listen,
|
||||
.SearchForHosts = Loop_SearchForHosts,
|
||||
.Connect = Loop_Connect,
|
||||
.CheckNewConnections = Loop_CheckNewConnections,
|
||||
.QGetMessage = Loop_GetMessage,
|
||||
.QSendMessage = Loop_SendMessage,
|
||||
.SendUnreliableMessage = Loop_SendUnreliableMessage,
|
||||
.CanSendMessage = Loop_CanSendMessage,
|
||||
.CanSendUnreliableMessage = Loop_CanSendUnreliableMessage,
|
||||
.Close = Loop_Close,
|
||||
.Shutdown = Loop_Shutdown
|
||||
}
|
||||
};
|
||||
int net_numdrivers = 1;
|
||||
|
||||
net_landriver_t net_landrivers[MAX_NET_DRIVERS];
|
||||
net_landriver_t net_landrivers[0];
|
||||
int net_numlandrivers = 0;
|
||||
|
@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#include "quakedef.h"
|
||||
|
||||
net_driver_t net_drivers[MAX_NET_DRIVERS] = {
|
||||
net_driver_t net_drivers[] = {
|
||||
{
|
||||
.name = "Loopback",
|
||||
.initialized = false,
|
||||
@ -61,8 +61,7 @@ net_driver_t net_drivers[MAX_NET_DRIVERS] = {
|
||||
|
||||
int net_numdrivers = 2;
|
||||
|
||||
|
||||
net_landriver_t net_landrivers[MAX_NET_DRIVERS] = {
|
||||
net_landriver_t net_landrivers[] = {
|
||||
{
|
||||
.name = "Winsock TCPIP",
|
||||
.initialized = false,
|
||||
|
Loading…
Reference in New Issue
Block a user