Fix Windows compiling and some other slight things
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3281 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
57ae06fe66
commit
f5ee9ce852
|
@ -128,6 +128,8 @@ if(isActivated())
|
||||||
}
|
}
|
||||||
bool CEXIETHERNET::sendPacket(u8 *etherpckt, int size)
|
bool CEXIETHERNET::sendPacket(u8 *etherpckt, int size)
|
||||||
{
|
{
|
||||||
|
if(!isActivated())
|
||||||
|
activate();
|
||||||
DEBUGPRINT( "Packet: 0x");
|
DEBUGPRINT( "Packet: 0x");
|
||||||
for(int a = 0; a < size; ++a)
|
for(int a = 0; a < size; ++a)
|
||||||
{
|
{
|
||||||
|
@ -136,8 +138,9 @@ bool CEXIETHERNET::sendPacket(u8 *etherpckt, int size)
|
||||||
DEBUGPRINT( " : Size: %d\n", size);
|
DEBUGPRINT( " : Size: %d\n", size);
|
||||||
DWORD numBytesWrit;
|
DWORD numBytesWrit;
|
||||||
OVERLAPPED overlap;
|
OVERLAPPED overlap;
|
||||||
|
memset((void*)&overlap, 0, sizeof(overlap));
|
||||||
//ZERO_OBJECT(overlap);
|
//ZERO_OBJECT(overlap);
|
||||||
overlap.hEvent = mHRecvEvent;
|
//overlap.hEvent = mHRecvEvent;
|
||||||
if(!WriteFile(mHAdapter, etherpckt, size, &numBytesWrit, &overlap))
|
if(!WriteFile(mHAdapter, etherpckt, size, &numBytesWrit, &overlap))
|
||||||
{ // Fail Boat
|
{ // Fail Boat
|
||||||
DWORD res = GetLastError();
|
DWORD res = GetLastError();
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <winioctl.h>
|
#include <winioctl.h>
|
||||||
#define TAP_WIN32_MIN_MAJOR 8
|
#define TAP_WIN32_MIN_MAJOR 9
|
||||||
#define TAP_WIN32_MIN_MINOR 1
|
#define TAP_WIN32_MIN_MINOR 0
|
||||||
|
|
||||||
//=============
|
//=============
|
||||||
// TAP IOCTLs
|
// TAP IOCTLs
|
||||||
|
@ -84,4 +84,4 @@
|
||||||
// simultaneously.
|
// simultaneously.
|
||||||
//=========================================================
|
//=========================================================
|
||||||
|
|
||||||
#define TAP_COMPONENT_ID "tap0801"
|
#define TAP_COMPONENT_ID "tap0901"
|
||||||
|
|
|
@ -144,13 +144,14 @@ private:
|
||||||
|
|
||||||
volatile bool mWaiting;
|
volatile bool mWaiting;
|
||||||
WriteBuffer mRecvBuffer;
|
WriteBuffer mRecvBuffer;
|
||||||
u32 mRecvBufferLength;
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
HANDLE mHAdapter, mHRecvEvent, mHReadWait;
|
HANDLE mHAdapter, mHRecvEvent, mHReadWait;
|
||||||
DWORD mMtu;
|
DWORD mMtu;
|
||||||
OVERLAPPED mReadOverlapped;
|
OVERLAPPED mReadOverlapped;
|
||||||
DWORD mRecvBufferLength;
|
DWORD mRecvBufferLength;
|
||||||
static VOID CALLBACK ReadWaitCallback(PVOID lpParameter, BOOLEAN TimerFired);
|
static VOID CALLBACK ReadWaitCallback(PVOID lpParameter, BOOLEAN TimerFired);
|
||||||
|
#else
|
||||||
|
u32 mRecvBufferLength;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue