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:
parent
23c934c192
commit
a5837f0fdc
2
Makefile
2
Makefile
@ -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/.*: //')
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user