mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 05:09:46 -06:00
fuck every aspect of this
This commit is contained in:
@ -1741,8 +1741,6 @@ std::unique_ptr<CartCommon> ParseROM(const u8* romdata, u32 romlen)
|
|||||||
return cart;
|
return cart;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Why a move function? Because the Cart object is polymorphic,
|
|
||||||
// and cloning polymorphic objects without knowing the underlying type is annoying.
|
|
||||||
bool InsertROM(std::unique_ptr<CartCommon>&& cart)
|
bool InsertROM(std::unique_ptr<CartCommon>&& cart)
|
||||||
{
|
{
|
||||||
if (!cart) {
|
if (!cart) {
|
||||||
@ -1753,6 +1751,8 @@ bool InsertROM(std::unique_ptr<CartCommon>&& cart)
|
|||||||
if (Cart)
|
if (Cart)
|
||||||
EjectCart();
|
EjectCart();
|
||||||
|
|
||||||
|
// Why a move function? Because the Cart object is polymorphic,
|
||||||
|
// and cloning polymorphic objects without knowing the underlying type is annoying.
|
||||||
Cart = std::move(cart);
|
Cart = std::move(cart);
|
||||||
|
|
||||||
Cart->Reset();
|
Cart->Reset();
|
||||||
|
@ -68,7 +68,7 @@ bool MACEqual(u8* a, const u8* b);
|
|||||||
bool MACIsBroadcast(u8* a);
|
bool MACIsBroadcast(u8* a);
|
||||||
|
|
||||||
|
|
||||||
WifiAP::WifiAP(class Wifi* wifi) : Wifi(wifi)
|
WifiAP::WifiAP(Wifi* client) : Client(client)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ int WifiAP::RecvPacket(u8* data)
|
|||||||
// check destination MAC
|
// check destination MAC
|
||||||
if (!MACIsBroadcast(&LANBuffer[0]))
|
if (!MACIsBroadcast(&LANBuffer[0]))
|
||||||
{
|
{
|
||||||
if (!MACEqual(&LANBuffer[0], Wifi->GetMAC()))
|
if (!MACEqual(&LANBuffer[0], Client->GetMAC()))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class Wifi;
|
|||||||
class WifiAP
|
class WifiAP
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WifiAP(Wifi* wifi);
|
WifiAP(Wifi* client);
|
||||||
~WifiAP();
|
~WifiAP();
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ public:
|
|||||||
int RecvPacket(u8* data);
|
int RecvPacket(u8* data);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Wifi* Wifi;
|
Wifi* Client;
|
||||||
|
|
||||||
u64 USCounter;
|
u64 USCounter;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user