Is it possible to scroll log window?

Everything about ToME 4.x.x. No spoilers, please

Moderator: Moderator

Post Reply
Message
Author
Postman
Archmage
Posts: 335
Joined: Fri Dec 03, 2010 5:34 pm

Is it possible to scroll log window?

#1 Post by Postman »

Subj.

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: Is it possible to scroll log window?

#2 Post by Grey »

Yep, but only with a scrollwheel on a mouse.
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

Postman
Archmage
Posts: 335
Joined: Fri Dec 03, 2010 5:34 pm

Re: Is it possible to scroll log window?

#3 Post by Postman »

Can not be redefined in key bindings?

greycat
Sher'Tul
Posts: 1396
Joined: Tue May 11, 2010 11:51 pm

Re: Is it possible to scroll log window?

#4 Post by greycat »

People like me who do not have a scroll-mouse are SOL there.

Actually, what I do is edit src/main.c and make sure buffering is set to line mode, not the default block mode. And capture the log (stdout) to a file. And then if I need to look back at what the hell just happened, I can look in the file.

Works for in-game chat, too. With line-mode buffering and a stdout log file, you can use tail -f | grep to get the chat output in a separate window.

hops
Halfling
Posts: 111
Joined: Tue Sep 21, 2010 9:05 am

Re: Is it possible to scroll log window?

#5 Post by hops »

greycat wrote: Actually, what I do is edit src/main.c and make sure buffering is set to line mode, not the default block mode.
greycat, can you please post the lines you edited, or the diff? I tried to collect the outputs in a named-pipe, but the I think buffering is performed in a annoying manner. Thanks.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Is it possible to scroll log window?

#6 Post by darkgod »

Next beta adds a command line parameters to enabled line buffering
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

greycat
Sher'Tul
Posts: 1396
Joined: Tue May 11, 2010 11:51 pm

Re: Is it possible to scroll log window?

#7 Post by greycat »

Something like this, but it may not apply cleanly, because I had to add the comments back in manually to generate the diff....

Code: Select all

--- src/main.c.orig	2011-03-10 13:42:06.000000000 -0500
+++ src/main.c	2011-03-10 13:41:58.000000000 -0500
@@ -803,7 +803,7 @@
 	init_gen_rand(time(NULL));
 
 	// Change to line buffering
-//	setvbuf(stdout, (char *) NULL, _IOLBF, 0);
+	setvbuf(stdout, (char *) NULL, _IOLBF, 0);
 
 	// Parse arguments
 	int i;
A better diff might be "uncomment the setvbuf line". ;)

hops
Halfling
Posts: 111
Joined: Tue Sep 21, 2010 9:05 am

Re: Is it possible to scroll log window?

#8 Post by hops »

Thanks, darkgod and greycat.

Post Reply