Patch : Quiet Mode [Win32]

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
Xaroth
Engineer
Engineer
Posts: 103
Joined: 01 May 2006 09:09

Patch : Quiet Mode [Win32]

Post by Xaroth »

Simple patch, adds a -q command line argument for starting OpenTTD, to use together with -D

Basically it 'hides' the console of OpenTTD, but with stdin/stdout/stderr allocated so you can hook into them, allowing other programs to 'manage' an OpenTTD dedicated server.
Attachments
noconsole.patch
.patch against r5295
(2.75 KiB) Downloaded 164 times
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

I think if you are doing work on the console, it should Just Work.

Let's forget debugging mode for a minute, because that doesn't count.
If you start openttd normally it should not have a console, only with -d or -D (as it is now).

If you start openttd from a console itself both -d and -D should NOT create a console, but use the existing console from which it was started. There is no need to add any additional -q (quiet) switch because this is what would be expected.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
Xaroth
Engineer
Engineer
Posts: 103
Joined: 01 May 2006 09:09

Post by Xaroth »

Actually The whole thing is this.

You make a program in, for isntance, C#.. you start OpenTTD-Dedicated with the flag to hide it's window..
you end up.. with your program running, and OpenTTD's console.. even though you told it -not- to show.

OR

cmd > openttd -d3
you end up.. with your cmd console (locked since you're running something), the OpenTTD main screen, AND A CONSOLE

the same goes for -D

now you can do.

"openttd -D -q"
and your program will run, and OpenTTD will NOT create a console (unless you specify -d)
User avatar
Hackykid
Traffic Manager
Traffic Manager
Posts: 157
Joined: 22 Nov 2004 16:04
Location: Eindhoven de Gekste!!! (ongeveer ;P)
Contact:

Post by Hackykid »

Darkvater wrote: If you start openttd from a console itself both -d and -D should NOT create a console, but use the existing console from which it was started.
well, here on windows XP, starting openttd -D from a console window *does* spawn a new window.
DopeFish Lives!!!
Xaroth
Engineer
Engineer
Posts: 103
Joined: 01 May 2006 09:09

Post by Xaroth »

Hackykid wrote:
Darkvater wrote: If you start openttd from a console itself both -d and -D should NOT create a console, but use the existing console from which it was started.
well, here on windows XP, starting openttd -D from a console window *does* spawn a new window.
Same result here.

Conclusion: XP is gay, but then again, what else is new?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: piratescooby and 10 guests