mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-30 00:10:40 +00:00
massive windows.h and WIN32 cleanup.
This commit is contained in:
parent
8557d50235
commit
2d068c0745
19 changed files with 20 additions and 320 deletions
|
@ -77,9 +77,6 @@ int noconinput;
|
|||
|
||||
#ifdef _WIN32
|
||||
# include "winquake.h"
|
||||
// FIXME: minimized is not currently supported under SDL
|
||||
qboolean Minimized = false;
|
||||
void MaskExceptions (void);
|
||||
#endif
|
||||
|
||||
void
|
||||
|
@ -89,9 +86,6 @@ Sys_Init (void)
|
|||
OSVERSIONINFO vinfo;
|
||||
#endif
|
||||
#ifdef USE_INTEL_ASM
|
||||
#ifdef _WIN32
|
||||
MaskExceptions ();
|
||||
#endif
|
||||
Sys_SetFPCW ();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -366,11 +366,11 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
|
|||
if (host_parms.memsize > MAXIMUM_WIN_MEMORY)
|
||||
host_parms.memsize = MAXIMUM_WIN_MEMORY;
|
||||
|
||||
if (COM_CheckParm ("-heapsize")) {
|
||||
t = COM_CheckParm ("-heapsize") + 1;
|
||||
if (COM_CheckParm ("-mem")) {
|
||||
t = COM_CheckParm ("-mem") + 1;
|
||||
|
||||
if (t < com_argc)
|
||||
host_parms.memsize = atoi (com_argv[t]) * 1024;
|
||||
host_parms.memsize = atoi (com_argv[t]) * 1024 * 1024;
|
||||
}
|
||||
|
||||
host_parms.membase = malloc (host_parms.memsize);
|
||||
|
|
|
@ -30,12 +30,8 @@ static const char rcsid[] =
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#ifndef _WIN32
|
||||
# ifdef HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
# endif
|
||||
#else
|
||||
# include <windows.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
|
@ -116,11 +112,7 @@ Netchan_Init (void)
|
|||
int port;
|
||||
|
||||
// pick a port value that should be nice and random
|
||||
#ifdef _WIN32
|
||||
port = ((int) (timeGetTime () * 1000) * time (NULL)) & 0xffff;
|
||||
#else
|
||||
port = ((int) (getpid () + getuid () * 1000) * time (NULL)) & 0xffff;
|
||||
#endif
|
||||
port = rand () * (65536.0 / RAND_MAX);
|
||||
|
||||
Cvar_SetValue (qport, port);
|
||||
}
|
||||
|
@ -132,11 +124,11 @@ Netchan_Init_Cvars (void)
|
|||
"Show all network packets");
|
||||
showdrop = Cvar_Get ("showdrop", "0", CVAR_NONE, NULL, "Toggle the "
|
||||
"display of how many packets you are dropping");
|
||||
qport = Cvar_Get ("qport", "0", CVAR_NONE, NULL, "The internal port "
|
||||
"number for the game networking code. Useful for "
|
||||
"clients who use multiple connections through one "
|
||||
"IP address (NAT/IP-MASQ) because default port is "
|
||||
"random.");
|
||||
qport = Cvar_Get ("qport", "0", CVAR_NONE, NULL, "The internal port "
|
||||
"number for the game networking code. Useful for "
|
||||
"clients who use multiple connections through one "
|
||||
"IP address (NAT/IP-MASQ) because default port is "
|
||||
"random.");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -136,9 +136,6 @@ main (int argc, const char **argv)
|
|||
|
||||
host_parms.memsize = 8 * 1024 * 1024;
|
||||
|
||||
if ((t = COM_CheckParm ("-heapsize")) != 0 && t + 1 < com_argc)
|
||||
host_parms.memsize = atoi (com_argv[t + 1]) * 1024;
|
||||
|
||||
if ((t = COM_CheckParm ("-mem")) != 0 && t + 1 < com_argc)
|
||||
host_parms.memsize = atoi (com_argv[t + 1]) * 1024 * 1024;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue