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.
defx2
Post
by defx2 » Thu Feb 19, 2004 8:24 pm
I get an Memory Error when i press the ESC-Key. but only when he is not in fullscreen mode. Why ??
Code: Select all
if (event.EventType == EET_KEY_INPUT_EVENT &&
event.KeyInput.Key == KEY_ESCAPE &&
event.KeyInput.PressedDown == false)
{
device->closeDevice();
}
There is an Bug in the Forum Search. "Search for all terms" show the same like "Search for any terms" when i search for more than one therms.[/code]
Robomaniac
Posts: 602 Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:
Post
by Robomaniac » Thu Feb 19, 2004 8:35 pm
I don't use closeDevice (didn't even know it existed). I just use return false; and that works fine for me
defx2
Post
by defx2 » Thu Feb 19, 2004 8:49 pm
where do you insert this "return false". My closeDevice is in the event Receiver.
Robomaniac
Posts: 602 Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:
Post
by Robomaniac » Thu Feb 19, 2004 11:55 pm
Code: Select all
if (what ever key you want goes here)
{
return false;
}
Guest
Post
by Guest » Fri Feb 20, 2004 1:57 am
call device->closeDevice() after you leafe your game loop. if you close the device in the eventreceiver it can't return properly from the event loop and things get mixed up. especialy if there are still window messages to handel if operating in window mode.....
so use a "global" boolean which you set to false in the receiver if you want to quit (as Robomaniac suggested) and in the game loop test against that boolean.
level1
Post
by level1 » Fri Feb 20, 2004 1:59 am
that Guest was me, sorry
defx2
Post
by defx2 » Fri Feb 20, 2004 2:48 pm
Thank you. I will try it out on the weekend.