Geme crashes...

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
Fhqwhgads
Posts: 42
Joined: Tue Jun 21, 2005 1:43 am

Geme crashes...

Post by Fhqwhgads »

I have no idea at all as to why it does. It compiles fine in Vc++ 2006 express. My code...

http://www.christiangaming.org/graphics ... iecode.zip
iam13013
Posts: 31
Joined: Sun Dec 04, 2005 11:06 pm

Post by iam13013 »

The problem was in your event receiver...

Change EventReceiver.h to

Code: Select all

#include "headers.h"

class MyEventReceiver : public IEventReceiver
{
public:
bool keyEnter;
bool click;

	virtual bool OnEvent(SEvent event)
	{	
		if (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown)
		{
			if(event.KeyInput.Key == irr::KEY_RETURN)
			{			
				if(!keyEnter)
				keyEnter = true;
			};
		};
	
	return false;
	};

Then, in GameCore.h change

MyEventReceiver* events;
to
MyEventReceiver events;

then change
irrDevice->setEventReceiver(events);
to
irrDevice->setEventReceiver(&events);

That should work...
Post Reply