mirror of
https://github.com/solemnwarning/ipxwrapper
synced 2024-12-30 16:45:37 +01:00
Use get_main_config() to load correct log level from registry in stub DLLs.
This commit is contained in:
parent
8cf1f4eaa4
commit
fab32bf974
6
Makefile
6
Makefile
@ -85,8 +85,8 @@ ipxwrapper.dll: $(IPXWRAPPER_DEPS)
|
|||||||
ipxconfig.exe: src/ipxconfig.cpp icons/ipxconfig.o src/addr.o src/interface.o src/common.o src/config.o
|
ipxconfig.exe: src/ipxconfig.cpp icons/ipxconfig.o src/addr.o src/interface.o src/common.o src/config.o
|
||||||
$(CXX) $(CXXFLAGS) -static-libgcc -static-libstdc++ -D_WIN32_IE=0x0400 -mwindows -o ipxconfig.exe $^ -liphlpapi -lcomctl32 -lws2_32
|
$(CXX) $(CXXFLAGS) -static-libgcc -static-libstdc++ -D_WIN32_IE=0x0400 -mwindows -o ipxconfig.exe $^ -liphlpapi -lcomctl32 -lws2_32
|
||||||
|
|
||||||
dpwsockx.dll: src/directplay.o src/log.o src/dpwsockx_stubs.o src/common.o
|
dpwsockx.dll: src/directplay.o src/log.o src/dpwsockx_stubs.o src/common.o src/config.o src/addr.o src/dpwsockx.def
|
||||||
$(CC) $(CFLAGS) -Wl,--enable-stdcall-fixup -shared -o dpwsockx.dll src/directplay.o src/log.o src/common.o src/dpwsockx_stubs.o src/dpwsockx.def -lwsock32
|
$(CC) $(CFLAGS) -Wl,--enable-stdcall-fixup -shared -o $@ $^ -lwsock32
|
||||||
|
|
||||||
src/ipxwrapper_stubs.s: src/ipxwrapper_stubs.txt
|
src/ipxwrapper_stubs.s: src/ipxwrapper_stubs.txt
|
||||||
perl mkstubs.pl src/ipxwrapper_stubs.txt src/ipxwrapper_stubs.s 0
|
perl mkstubs.pl src/ipxwrapper_stubs.txt src/ipxwrapper_stubs.s 0
|
||||||
@ -103,7 +103,7 @@ src/dpwsockx_stubs.s: src/dpwsockx_stubs.txt
|
|||||||
icons/%.o: icons/%.rc icons/%.ico
|
icons/%.o: icons/%.rc icons/%.ico
|
||||||
windres $< -O coff -o $@
|
windres $< -O coff -o $@
|
||||||
|
|
||||||
%.dll: src/stubdll.o src/%_stubs.o src/log.o src/common.o src/%.def
|
%.dll: src/stubdll.o src/%_stubs.o src/log.o src/common.o src/config.o src/addr.o src/%.def
|
||||||
$(CC) $(CFLAGS) -Wl,--enable-stdcall-fixup -shared -o $@ $^
|
$(CC) $(CFLAGS) -Wl,--enable-stdcall-fixup -shared -o $@ $^
|
||||||
|
|
||||||
src/%_stubs.o: src/%_stubs.s
|
src/%_stubs.o: src/%_stubs.s
|
||||||
|
@ -582,11 +582,7 @@ BOOL WINAPI DllMain(HINSTANCE me, DWORD why, LPVOID res) {
|
|||||||
{
|
{
|
||||||
log_open("ipxwrapper.log");
|
log_open("ipxwrapper.log");
|
||||||
|
|
||||||
HKEY reg = reg_open_main(false);
|
min_log_level = get_main_config().log_level;
|
||||||
|
|
||||||
min_log_level = reg_get_dword(reg, "min_log_level", LOG_INFO);
|
|
||||||
|
|
||||||
reg_close(reg);
|
|
||||||
}
|
}
|
||||||
else if(why == DLL_PROCESS_DETACH)
|
else if(why == DLL_PROCESS_DETACH)
|
||||||
{
|
{
|
||||||
|
@ -32,3 +32,4 @@ s_perror
|
|||||||
sethostname
|
sethostname
|
||||||
inet_addr
|
inet_addr
|
||||||
WSHEnumProtocols:0
|
WSHEnumProtocols:0
|
||||||
|
ntohs:1
|
||||||
|
@ -20,17 +20,14 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
BOOL WINAPI DllMain(HINSTANCE me, DWORD why, LPVOID res) {
|
BOOL WINAPI DllMain(HINSTANCE me, DWORD why, LPVOID res) {
|
||||||
if(why == DLL_PROCESS_ATTACH)
|
if(why == DLL_PROCESS_ATTACH)
|
||||||
{
|
{
|
||||||
log_open("ipxwrapper.log");
|
log_open("ipxwrapper.log");
|
||||||
|
|
||||||
HKEY reg = reg_open_main(false);
|
min_log_level = get_main_config().log_level;
|
||||||
|
|
||||||
min_log_level = reg_get_dword(reg, "min_log_level", LOG_INFO);
|
|
||||||
|
|
||||||
reg_close(reg);
|
|
||||||
}
|
}
|
||||||
else if(why == DLL_PROCESS_DETACH)
|
else if(why == DLL_PROCESS_DETACH)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user