Page 1 of 1

Problem ( already ) with 0.7

Posted: Sat Sep 11, 2004 11:52 am
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;
	}

Posted: Sat Sep 11, 2004 1:48 pm
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 
 )  

Posted: Sat Sep 11, 2004 2:17 pm
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

Posted: Sat Sep 11, 2004 6:09 pm
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.

Posted: Sun Sep 12, 2004 8:13 am
by niko
Yep, too bad the C++ compilers take a pointer as bool without saying anything..

Posted: Sun Sep 12, 2004 10:19 am
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 ;)