Thanks! that's exactly what I needed! I'm going for SDL, it looks more "polished" than Allegro and it has good references (like Civilization) - you can correct me if i'm wrong :-)
T
----- Original Message -----
From: Scott Simontis <age...@co...>
Date: Tue, 20 Jul 2004 11:48:13 -0400
To: Tony Boloney <tbo...@ly...>,Dev-C++ User Group <dev...@li...>
Subject: Re: [Dev-C++] pthreads, cin.get & key codes
> You could try to use a cross-platform input library. Maybe Allegro or
> SDL would work.
> Tony Boloney wrote:
>
> >Hi there,
> >
> >I am programming a simple win32 console app which I would like to keep portable to other platforms.
> >What is a good way to fetch interactive keyboard input? I mean input without having to press ENTER each time?
> >
> >I was thinking about doing this with threads, e.g. a KeypressEventDispatcher thread and a KeyPressEventHandler thread using the pthreads lib. Do you think this is a good idea? How are those threads layered with respect to the native Windows OS threads?
> >
> >Suppose my KeyboardEventDispatcher thread listens for keyboard input with cin.get(my_char) and the console app window loses focus, will this thread keep on running in the background? Will it keep on catching keypress events?
> >
> >And a last question: is there a header file with symbolic expressions for key codes? in windows there's "virtual key codes" (i think it was in windows.h), is there some standard equivalent for that? (I mean for non-ASCII characters)
> >
> >Thanks!
> >
> >
> >
> >
>
--
_______________________________________________
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10
|