From 4885c6588b76312d14a99d3704682985330ce9e8 Mon Sep 17 00:00:00 2001 From: luigi__ Date: Thu, 13 May 2010 16:12:12 +0000 Subject: [PATCH] Fix WinPCap loading. No idea why zeromus made it load pcap_send() instead of pcap_sendpacket(), but now it supports both, and if pcap_send() can't be found, pcap_sendpacket() is loaded instead. --- desmume/src/windows/winpcap.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/desmume/src/windows/winpcap.h b/desmume/src/windows/winpcap.h index 6b7297072..06aaa2e6d 100644 --- a/desmume/src/windows/winpcap.h +++ b/desmume/src/windows/winpcap.h @@ -62,9 +62,14 @@ static void LoadWinPCap() LOADSYMBOL(pcap_open_live); LOADSYMBOL(pcap_close); LOADSYMBOL(pcap_setnonblock); - LOADSYMBOL(pcap_send); LOADSYMBOL(pcap_dispatch); + _pcap_send = (T_pcap_send)GetProcAddress(wpcap, "pcap_send"); + if (_pcap_send == NULL) + _pcap_send = (T_pcap_send)GetProcAddress(wpcap, "pcap_sendpacket"); + if (_pcap_send == NULL) + return; + bWinPCapAvailable = true; }