From abcd172c835eaea80984f8477c3ddb48eeb99e71 Mon Sep 17 00:00:00 2001 From: riccardom Date: Tue, 18 Aug 2009 11:14:35 +0000 Subject: [PATCH] Move some stuff around so that it compiles with gcc. --- desmume/src/wifi.cpp | 57 +++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/desmume/src/wifi.cpp b/desmume/src/wifi.cpp index 4402bcdc5..f3077eea7 100644 --- a/desmume/src/wifi.cpp +++ b/desmume/src/wifi.cpp @@ -210,7 +210,39 @@ struct WifiComInterface void (*usTrigger)(); }; -WifiComInterface* wifiComs[]; +bool SoftAP_Init(); +void SoftAP_DeInit(); +void SoftAP_Reset(); +void SoftAP_SendPacket(u8 *packet, u32 len); +void SoftAP_usTrigger(); + +WifiComInterface SoftAP = { + SoftAP_Init, + SoftAP_DeInit, + SoftAP_Reset, + SoftAP_SendPacket, + SoftAP_usTrigger +}; + +bool Adhoc_Init(); +void Adhoc_DeInit(); +void Adhoc_Reset(); +void Adhoc_SendPacket(u8* packet, u32 len); +void Adhoc_usTrigger(); + +WifiComInterface Adhoc = { + Adhoc_Init, + Adhoc_DeInit, + Adhoc_Reset, + Adhoc_SendPacket, + Adhoc_usTrigger +}; + +WifiComInterface* wifiComs[] = { + &Adhoc, + &SoftAP, + NULL +}; WifiComInterface* wifiCom; /******************************************************************************* @@ -1257,14 +1289,6 @@ void Adhoc_usTrigger() { } -WifiComInterface Adhoc = { - Adhoc_Init, - Adhoc_DeInit, - Adhoc_Reset, - Adhoc_SendPacket, - Adhoc_usTrigger -}; - /******************************************************************************* SoftAP (fake wifi access point) @@ -1665,19 +1689,4 @@ void SoftAP_usTrigger() } } -WifiComInterface SoftAP = { - SoftAP_Init, - SoftAP_DeInit, - SoftAP_Reset, - SoftAP_SendPacket, - SoftAP_usTrigger -}; - - -WifiComInterface* wifiComs[] = { - &Adhoc, - &SoftAP, - NULL -}; - #endif