mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 15:50:00 -06:00
fixor Platform.cpp
also remove debug shit that accidentally slipped in
This commit is contained in:
@ -22,7 +22,8 @@
|
||||
#include <SDL2/SDL.h>
|
||||
#include "../Platform.h"
|
||||
#include "../Config.h"
|
||||
#include "LAN.h"
|
||||
#include "LAN_Socket.h"
|
||||
#include "LAN_PCap.h"
|
||||
|
||||
#ifdef __WIN32__
|
||||
#include <winsock2.h>
|
||||
@ -261,23 +262,43 @@ int MP_RecvPacket(u8* data, bool block)
|
||||
|
||||
bool LAN_Init()
|
||||
{
|
||||
if (!LAN::Init()) return false;
|
||||
if (Config::DirectLAN)
|
||||
{
|
||||
if (!LAN_PCap::Init())
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!LAN_Socket::Init())
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void LAN_DeInit()
|
||||
{
|
||||
LAN::DeInit();
|
||||
// checkme. blarg
|
||||
if (Config::DirectLAN)
|
||||
LAN_PCap::DeInit();
|
||||
else
|
||||
LAN_Socket::DeInit();
|
||||
}
|
||||
|
||||
int LAN_SendPacket(u8* data, int len)
|
||||
{
|
||||
return LAN::SendPacket(data, len);
|
||||
if (Config::DirectLAN)
|
||||
return LAN_PCap::SendPacket(data, len);
|
||||
else
|
||||
return LAN_Socket::SendPacket(data, len);
|
||||
}
|
||||
|
||||
int LAN_RecvPacket(u8* data)
|
||||
{
|
||||
return LAN::RecvPacket(data);
|
||||
if (Config::DirectLAN)
|
||||
return LAN_PCap::RecvPacket(data);
|
||||
else
|
||||
return LAN_Socket::RecvPacket(data);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user