mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 15:55:31 +01:00
Partially implement NCDGetWirelessMacAddress on Windows as well
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5285 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
8549b30170
commit
33a005c801
@ -51,6 +51,7 @@ it failed)
|
|||||||
#include <string>
|
#include <string>
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
|
#include <iphlpapi.h>
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
@ -311,9 +312,24 @@ bool CWII_IPC_HLE_Device_net_ncd_manage::IOCtlV(u32 _CommandAddress)
|
|||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
//#elif defined(WIN32)
|
#elif defined(WIN32)
|
||||||
// TODO
|
IP_ADAPTER_INFO *adapter_info = NULL;
|
||||||
|
DWORD len = 0;
|
||||||
|
|
||||||
|
DWORD ret = GetAdaptersInfo(adapter_info, &len);
|
||||||
|
if (ret != ERROR_BUFFER_OVERFLOW || !len)
|
||||||
|
{
|
||||||
|
Memory::WriteBigEData(default_address, CommandBuffer.PayloadBuffer.at(1).m_Address, 4);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
adapter_info = new IP_ADAPTER_INFO[len / sizeof(IP_ADAPTER_INFO)];
|
||||||
|
ret = GetAdaptersInfo(adapter_info, &len);
|
||||||
|
|
||||||
|
if (SUCCEEDED(ret)) Memory::WriteBigEData(adapter_info->Address, CommandBuffer.PayloadBuffer.at(1).m_Address, 4);
|
||||||
|
else Memory::WriteBigEData(default_address, CommandBuffer.PayloadBuffer.at(1).m_Address, 4);
|
||||||
|
|
||||||
|
delete[] adapter_info;
|
||||||
#else
|
#else
|
||||||
Memory::WriteBigEData(default_address, CommandBuffer.PayloadBuffer.at(1).m_Address, 4);
|
Memory::WriteBigEData(default_address, CommandBuffer.PayloadBuffer.at(1).m_Address, 4);
|
||||||
#endif
|
#endif
|
||||||
|
@ -90,7 +90,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="comctl32.lib rpcrt4.lib winmm.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib Bochs_disasm.lib LZO.lib SFML_Network.lib zlib.lib"
|
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib Bochs_disasm.lib LZO.lib SFML_Network.lib zlib.lib"
|
||||||
OutputFile="../../../Binary/Win32/Dolphin.exe"
|
OutputFile="../../../Binary/Win32/Dolphin.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
@ -207,7 +207,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="comctl32.lib rpcrt4.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib"
|
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib"
|
||||||
OutputFile="../../../Binary/x64/Dolphin.exe"
|
OutputFile="../../../Binary/x64/Dolphin.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
@ -320,7 +320,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalOptions="/TLBID:1"
|
AdditionalOptions="/TLBID:1"
|
||||||
AdditionalDependencies="comctl32.lib rpcrt4.lib winmm.lib wxbase28ud.lib wxmsw28ud_core.lib wxmsw28ud_adv.lib wxmsw28ud_aui.lib Bochs_disasm.lib LZO.lib SFML_Network.lib zlib.lib"
|
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28ud.lib wxmsw28ud_core.lib wxmsw28ud_adv.lib wxmsw28ud_aui.lib Bochs_disasm.lib LZO.lib SFML_Network.lib zlib.lib"
|
||||||
OutputFile="../../../Binary/Win32/DolphinD.exe"
|
OutputFile="../../../Binary/Win32/DolphinD.exe"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
@ -431,7 +431,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalOptions="/TLBID:1"
|
AdditionalOptions="/TLBID:1"
|
||||||
AdditionalDependencies="comctl32.lib rpcrt4.lib winmm.lib wxbase28ud.lib wxmsw28ud_core.lib wxmsw28ud_adv.lib wxmsw28ud_aui.lib"
|
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28ud.lib wxmsw28ud_core.lib wxmsw28ud_adv.lib wxmsw28ud_aui.lib"
|
||||||
OutputFile="../../../Binary/x64/DolphinD.exe"
|
OutputFile="../../../Binary/x64/DolphinD.exe"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
@ -545,7 +545,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalOptions="/NODEFAULTLIB:msvcrt.lib
/NODEFAULTLIB:libcmtd.lib"
|
AdditionalOptions="/NODEFAULTLIB:msvcrt.lib
/NODEFAULTLIB:libcmtd.lib"
|
||||||
AdditionalDependencies="comctl32.lib rpcrt4.lib winmm.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib Bochs_disasm.lib LZO.lib SFML_Network.lib zlib.lib"
|
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib Bochs_disasm.lib LZO.lib SFML_Network.lib zlib.lib"
|
||||||
OutputFile="../../../Binary/Win32/DolphinDF.exe"
|
OutputFile="../../../Binary/Win32/DolphinDF.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
@ -658,7 +658,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="comctl32.lib rpcrt4.lib winmm.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib Bochs_disasm.lib LZO.lib SFML_Network.lib zlib.lib"
|
AdditionalDependencies="Iphlpapi.lib comctl32.lib rpcrt4.lib winmm.lib wxbase28u.lib wxmsw28u_core.lib wxmsw28u_adv.lib wxmsw28u_aui.lib Bochs_disasm.lib LZO.lib SFML_Network.lib zlib.lib"
|
||||||
OutputFile="../../../Binary/x64/DolphinDF.exe"
|
OutputFile="../../../Binary/x64/DolphinDF.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user