Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Flachy Joe
purr-data
Commits
18a305d6
Commit
18a305d6
authored
Jul 09, 2018
by
Jonathan Wilkes
Browse files
refactor so that WSAStartup call happens on Windows regardless of gui mode
parent
d64241da
Changes
2
Hide whitespace changes
Inline
Side-by-side
pd/src/s_inter.c
View file @
18a305d6
...
...
@@ -1231,10 +1231,6 @@ int sys_startgui(const char *guidir)
if
(
!
getcwd
(
cwd
,
FILENAME_MAX
))
strcpy
(
cwd
,
"."
);
#endif
#ifdef MSW
short
version
=
MAKEWORD
(
2
,
0
);
WSADATA
nobby
;
#endif
#ifdef HAVE_UNISTD_H
int
stdinpipe
[
2
];
#endif
...
...
@@ -1242,11 +1238,6 @@ int sys_startgui(const char *guidir)
sys_fdpoll
=
(
t_fdpoll
*
)
t_getbytes
(
0
);
sys_nfdpoll
=
0
;
inbinbuf
=
binbuf_new
();
#ifdef MSW
if
(
WSAStartup
(
version
,
&
nobby
))
sys_sockerror
(
"WSAstartup"
);
#endif
if
(
sys_nogui
)
{
/* fake the GUI's message giving cwd and font sizes; then
...
...
pd/src/s_main.c
View file @
18a305d6
...
...
@@ -335,9 +335,15 @@ int sys_main(int argc, char **argv)
#ifdef PD_DEBUG
fprintf
(
stderr
,
"Pd-L2Ork: COMPILED FOR DEBUGGING
\n
"
);
#endif
/* We need to call WSAStartup regardless of gui mode, since a user
* might want to make socket connections even in -nogui mode. So we
* go ahead and do that here. */
#ifdef _WIN32
short
version
=
MAKEWORD
(
2
,
0
);
WSADATA
nobby
;
if
(
WSAStartup
(
version
,
&
nobby
))
sys_sockerror
(
"WSAstartup"
);
/* use Win32 "binary" mode by default since we don't want the
* translation that Win32 does by default */
#ifdef _WIN32
# ifdef _MSC_VER
/* MS Visual Studio */
_set_fmode
(
_O_BINARY
);
# else
/* MinGW */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment