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:
parent
81bd8ef73c
commit
22f3ffb099
|
@ -89,7 +89,12 @@ void event_pipe_init(void)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
g_error("Couldn't open pipe: %s", strerror(errno));
|
g_error("Couldn't open pipe: %s", strerror(errno));
|
||||||
|
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
channel = g_io_channel_unix_new(event_pipe[0]);
|
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,
|
event_pipe_source_id = g_io_add_watch(channel, G_IO_IN,
|
||||||
main_notify_event, NULL);
|
main_notify_event, NULL);
|
||||||
g_io_channel_unref(channel);
|
g_io_channel_unref(channel);
|
||||||
|
|
Loading…
Reference in New Issue