1
0
mirror of https://github.com/solemnwarning/ipxwrapper synced 2024-12-30 16:45:37 +01:00

Added workaround for games that break WinSock IP support by clearing the environment (Carmageddon II).

This commit is contained in:
Daniel Collins 2012-05-10 01:18:25 +00:00
parent 23c934c192
commit a5837f0fdc
2 changed files with 11 additions and 1 deletions

View File

@ -20,7 +20,7 @@ else
DBG_OPT := -Wl,-s
endif
CFLAGS := -Wall $(DBG_OPT) -I./include/
CFLAGS := -Wall -D_WIN32_WINNT=0x0500 $(DBG_OPT) -I./include/
CXXFLAGS := $(CFLAGS)
VERSION := r$(shell svn info | grep Revision | sed -e 's/.*: //')

View File

@ -80,6 +80,16 @@ BOOL WINAPI DllMain(HINSTANCE me, DWORD why, LPVOID res) {
log_printf(LOG_INFO, "IPXWrapper %s", version_string);
log_printf(LOG_INFO, "Compiled at %s", compile_time);
if(!getenv("SystemRoot")) {
log_printf(LOG_WARNING, "SystemRoot is not set in the environment");
char env[268] = "SystemRoot=";
GetSystemWindowsDirectory(env+11, 256);
log_printf(LOG_INFO, "Setting SystemRoot to '%s'", env+11);
_putenv(env);
}
if(!rclient_init(&g_rclient)) {
return FALSE;
}