Alt key crashes engine :(

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
d4nm4n
Posts: 33
Joined: Fri Oct 09, 2009 11:28 pm

Alt key crashes engine :(

Post by d4nm4n »

For some reason pressing alt crashes the engine. Is this a known issue or anything like that?
larztheloser
Posts: 13
Joined: Thu Oct 08, 2009 8:58 pm
Location: New Zealand

Post by larztheloser »

Could you please post us the non-working code. Because my programs compile fine with no alt-key trouble.

Of course, alt-F4 will close the current window etc, so I take it you are handling that case.
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post by Adler1337 »

:? Never happened to me. Post some code or a screen shot.
multum in parvo
CuteAlien
Admin
Posts: 9930
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Definitely not a known issue :-) As long as it doesn't also happen with the examples you will have to show us some code so we can help you.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Lil Margin
Posts: 212
Joined: Sun Jul 19, 2009 4:24 am
Location: Netherlands Antilles, Curacao

Post by Lil Margin »

hmmmmm when i press alt it kinda pauses the program and when i press it again everything goes super forward till the time it shud of been.
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post by Adler1337 »

hmmmmm when i press alt it kinda pauses the program and when i press it again everything goes super forward till the time it shud of been.
That's because when you press alt the device loses focus, so it doesn't render anything.
multum in parvo
Lil Margin
Posts: 212
Joined: Sun Jul 19, 2009 4:24 am
Location: Netherlands Antilles, Curacao

Post by Lil Margin »

hmmm ok, is there a way i make it pause when it loses focus or is there a fix for it?
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post by Adler1337 »

hmmm ok, is there a way i make it pause when it loses focus or is there a fix for it?
Yeah here is some pseudo-code:

Code: Select all

bool paused = false;
while(device->run())
{
     if(device->losesFocus())
     {
          paused = true;
     }
     if(paused == false)
     {
          driver->beginScene();
          //all of that other stuff
     }
}
That should work(maybe)
multum in parvo
Post Reply