Windows port: re-add WSA init/deinit code.
(yup, sockets will be needed for wifi adhoc interface)
This commit is contained in:
parent
6e36bfe1fd
commit
a8ff7220cc
|
@ -1482,12 +1482,20 @@ static void ExitRunLoop()
|
||||||
|
|
||||||
class WinDriver : public BaseDriver
|
class WinDriver : public BaseDriver
|
||||||
{
|
{
|
||||||
virtual bool WIFI_Host_InitSystem() {
|
virtual bool WIFI_Host_InitSystem()
|
||||||
|
{
|
||||||
#ifdef EXPERIMENTAL_WIFI
|
#ifdef EXPERIMENTAL_WIFI
|
||||||
|
WSADATA wsaData;
|
||||||
|
WORD version = MAKEWORD(1,1);
|
||||||
|
if (WSAStartup(version, &wsaData))
|
||||||
|
{
|
||||||
|
printf("Failed initializing WSA.\n");
|
||||||
|
return false ;
|
||||||
|
}
|
||||||
//require wpcap.dll
|
//require wpcap.dll
|
||||||
HMODULE temp = LoadLibrary("wpcap.dll");
|
HMODULE temp = LoadLibrary("wpcap.dll");
|
||||||
if(temp == NULL) {
|
if(temp == NULL) {
|
||||||
printf("Failed initializing wpcap.dll - softAP support disabled\n");
|
printf("Failed initializing wpcap.dll - SoftAP support disabled.\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
FreeLibrary(temp);
|
FreeLibrary(temp);
|
||||||
|
@ -1496,7 +1504,11 @@ class WinDriver : public BaseDriver
|
||||||
return false ;
|
return false ;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
virtual void WIFI_Host_ShutdownSystem() {
|
virtual void WIFI_Host_ShutdownSystem()
|
||||||
|
{
|
||||||
|
#ifdef EXPERIMENTAL_WIFI
|
||||||
|
WSACleanup();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool AVI_IsRecording()
|
virtual bool AVI_IsRecording()
|
||||||
|
|
Loading…
Reference in New Issue