event_pipe: call g_io_channel_win32_new_fd()

On WIN32, use g_io_channel_win32_new_fd() instead of
g_io_channel_unix_new().  There doesn't seem to be a practical
difference, but it seems more correct.
This commit is contained in:
Max Kellermann 2010-05-19 07:32:10 +02:00
parent 81bd8ef73c
commit 22f3ffb099
1 changed files with 5 additions and 0 deletions

View File

@ -89,7 +89,12 @@ void event_pipe_init(void)
if (ret < 0)
g_error("Couldn't open pipe: %s", strerror(errno));
#ifndef G_OS_WIN32
channel = g_io_channel_unix_new(event_pipe[0]);
#else
channel = g_io_channel_win32_new_fd(event_pipe[0]);
#endif
event_pipe_source_id = g_io_add_watch(channel, G_IO_IN,
main_notify_event, NULL);
g_io_channel_unref(channel);