FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The escape key (key[KEY_ESC])

 
Post new topic   Reply to topic     Forum Index -> dallegro
View previous topic :: View next topic  
Author Message
joelcnz



Joined: 23 Feb 2009
Posts: 76

PostPosted: Sat Mar 07, 2009 12:52 am    Post subject: The escape key (key[KEY_ESC]) Reply with quote

Up until recently I haven't had a problem with it. It now works at the launch of my program but stops working though it works after hitting another key.
Back to top
View user's profile Send private message MSN Messenger
michaelp



Joined: 27 Jul 2008
Posts: 114

PostPosted: Sat Mar 07, 2009 4:36 pm    Post subject: Reply with quote

What do you mean by that?
Mind posting some code to demonstrate what you mean?
Back to top
View user's profile Send private message
joelcnz



Joined: 23 Feb 2009
Posts: 76

PostPosted: Sat Mar 07, 2009 7:04 pm    Post subject: Reply with quote

while( ! key[KEY_ESC] ) {
...
}

or
bool done=false;
While ( ! done ) {
if ( key[KEY_ESC] ) {
done=true;
}
}
Back to top
View user's profile Send private message MSN Messenger
torhu



Joined: 30 Mar 2006
Posts: 56

PostPosted: Thu Mar 19, 2009 2:50 pm    Post subject: Reply with quote

Are you sure it doesn't just stop somewhere inside the loop?
Back to top
View user's profile Send private message
joelcnz



Joined: 23 Feb 2009
Posts: 76

PostPosted: Tue Apr 21, 2009 12:59 am    Post subject: Reply with quote

The program runs alright though, it wouldn't if it would get stuck.
Back to top
View user's profile Send private message MSN Messenger
torhu



Joined: 30 Mar 2006
Posts: 56

PostPosted: Wed Apr 22, 2009 12:15 pm    Post subject: Reply with quote

It's hard to tell what's going on without seeing some more code. Wink Maybe you could post the whole thing if it's not too big?
Back to top
View user's profile Send private message
joelcnz



Joined: 23 Feb 2009
Posts: 76

PostPosted: Thu Apr 23, 2009 7:21 pm    Post subject: Reply with quote

This is a message, please ignore it.

Last edited by joelcnz on Thu Apr 23, 2009 7:32 pm; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
joelcnz



Joined: 23 Feb 2009
Posts: 76

PostPosted: Thu Apr 23, 2009 7:24 pm    Post subject: Reply with quote

I dunno. I can't seem to get not exit when I hit the escape key, at the moment. Maybe it's just my computer.
Back to top
View user's profile Send private message MSN Messenger
torhu



Joined: 30 Mar 2006
Posts: 56

PostPosted: Fri Apr 24, 2009 9:16 am    Post subject: Reply with quote

See if the examples that use KEY_ESC work. If they do, you're doing something wrong.
Back to top
View user's profile Send private message
joelcnz



Joined: 23 Feb 2009
Posts: 76

PostPosted: Fri Jun 12, 2009 9:41 pm    Post subject: key pressing, old program, 320x200 resolution Reply with quote

I've found an old allegro program has trouble with keys working too. So I think it might be my OS Vista or some thing. In my game the guy is supposed to go faster when you hold down the shift key but he only goes faster a bit. Found also (I have a second keyboard hooked up) my laptop shift key works better than my external keyboards shift key, (in my old program).

Another thing 320x200 resolution is a mess on my wide screened laptop. And changing to low res full screen resizes some of the windows.
Back to top
View user's profile Send private message MSN Messenger
torhu



Joined: 30 Mar 2006
Posts: 56

PostPosted: Sat Jun 13, 2009 10:35 am    Post subject: Reply with quote

I don't know if Vista can cause trouble, I still use XP. You could try asking over at the Allegro forum. I don't have widescreen either. Sorry that I can't be of much help. Confused
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> dallegro All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group