mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 11:01:36 +00:00
do not expect user input if stdin is redirected
If GZDoom is built on a POSIX system without the GTK frontend and not run from a KDE session, an IWAD picker is presented on the terminal and expects the user to select a game wad. However, if stdin is redirected, this won't work, so start with the default IWAD instead.
This commit is contained in:
parent
bc089ebb2b
commit
78ace538a6
1 changed files with 5 additions and 0 deletions
|
@ -338,6 +338,11 @@ int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
|
|||
return I_PickIWad_Cocoa (wads, numwads, showwin, defaultiwad);
|
||||
#endif
|
||||
|
||||
if (!isatty(fileno(stdin)))
|
||||
{
|
||||
return defaultiwad;
|
||||
}
|
||||
|
||||
printf ("Please select a game wad (or 0 to exit):\n");
|
||||
for (i = 0; i < numwads; ++i)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue