Problem ( already ) with 0.7

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Problem ( already ) with 0.7

Post by Tyn »

Edit: Wrong section, crap. If a mod sees this can you move to bug reports? Cheers.



Hey

Just downloaded the new engine and tried plugging it straight into my project. Unfortunatly, I am having some problems with mouse input. Whereas before there were no problems with these left and right mouse button catchers, they now completely ignore my inputs. None of the printf's I have put in are being displayed so it would seem it is completely ignoring any mouse input, however I can still move the mouse, the cursor still moves the selection box so I am stumped. Anyone?

Code: Select all

	virtual bool CTactManager::OnEvent(irr::SEvent event)
	{
		if (event.EventType == irr::EET_MOUSE_INPUT_EVENT)
		{
			if ( event.MouseInput.Event == irr::EMIE_LMOUSE_PRESSED_DOWN )
			{
				printf("\n\nLeft mouse pressed\n\n");
				lmbPressed();
				return true;
			}

			else if ( event.MouseInput.Event == irr::EMIE_RMOUSE_PRESSED_DOWN )
			{
				printf("\n\nRight mouse pressed\n\n");
				rmbPressed();
				return true;
			}
		}

		return false;
	}
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Yeah.. the first thing I saw when I ran some tests was this and already commented on #irrlichtnx that this would be the #1 asked question.

The solution...

createDevice now has an additional parameter for VSync. With your current code, I'm betting your event reciever is being dropped into the Vsync's bool.

Code: Select all

IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDevice  (  video::E_DRIVER_TYPE    deviceType = video::EDT_SOFTWARE,  
  const core::dimension2d< s32 > &    windowSize = core::dimension2d< s32 >(640, 480),  
  u32    bits = 16,  
  bool    fullscreen = false,  
  bool    stencilbuffer = false,  
  bool    vsync = false,  
  IEventReceiver *    receiver = 0,  
  const wchar_t *    sdk_version_do_not_use = IRRLICHT_SDK_VERSION 
 )  
Crud, how do I do this again?
yin nadie
Posts: 43
Joined: Wed Mar 31, 2004 1:03 pm
Location: Seville, Spain
Contact:

Post by yin nadie »

wow, that was frightening. I also compiled my 0.6 proyects only to discover that is would ignore all my input.

Correct me if i'm wrong, but... this change is documented in changes.txt? i didn't see it
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

It's in the changes.txt:

- The createDevice() function has a new additional parameter: bool vsync. With this, it is now
possible to enable or disable the waiting for the vertical retrace period. This is implemented
in D3D9, D3D8 and the OpenGL driver only, the software driver will ignore this flag.
Crud, how do I do this again?
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Yep, too bad the C++ compilers take a pointer as bool without saying anything..
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

I never knew that a compiler doesn't see an error in a pointer being passes as a bool, damn that is bad. Thanks for helping. Yeah, I made the mistake of skimming the changes.txt without seeing that a mod had been made to createDevice().
Yeah.. the first thing I saw when I ran some tests was this and already commented on #irrlichtnx that this would be the #1 asked question.
Glad not to disappoint ;)
Post Reply