fixed some bugs in MSW version
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c15fd9fba8
commit
7235a82e6c
@ -44,14 +44,6 @@
|
||||
# include "gsocket.h"
|
||||
#endif /* __GSOCKET_STANDALONE__ */
|
||||
|
||||
/* Redefine some GUI-only functions to do nothing in console mode */
|
||||
#if defined(wxUSE_GUI) && !wxUSE_GUI
|
||||
# define _GSocket_GUI_Init(socket) (1)
|
||||
# define _GSocket_GUI_Destroy(socket)
|
||||
# define _GSocket_Enable_Events(socket)
|
||||
# define _GSocket_Disable_Events(socket)
|
||||
#endif /* wxUSE_GUI */
|
||||
|
||||
#ifndef __WXWINCE__
|
||||
#include <assert.h>
|
||||
#else
|
||||
@ -761,8 +753,8 @@ int GSocket_Write(GSocket *socket, const char *buffer, int size)
|
||||
*/
|
||||
GSocketEventFlags GSocket_Select(GSocket *socket, GSocketEventFlags flags)
|
||||
{
|
||||
#if defined(wxUSE_GUI) && !wxUSE_GUI
|
||||
|
||||
if (USE_GUI())
|
||||
{
|
||||
GSocketEventFlags result = 0;
|
||||
fd_set readfds;
|
||||
fd_set writefds;
|
||||
@ -867,13 +859,12 @@ GSocketEventFlags GSocket_Select(GSocket *socket, GSocketEventFlags flags)
|
||||
}
|
||||
|
||||
return (result & flags);
|
||||
|
||||
#else
|
||||
|
||||
}
|
||||
else /* !USE_GUI() */
|
||||
{
|
||||
assert(socket != NULL);
|
||||
return flags & socket->m_detected;
|
||||
|
||||
#endif /* !wxUSE_GUI */
|
||||
}
|
||||
}
|
||||
|
||||
/* Attributes */
|
||||
|
Loading…
Reference in New Issue
Block a user