Game Development Community

Basic mouse capture failed to enable

by Steve Lamperti · in Torque Game Engine · 11/29/2005 (5:24 pm) · 9 replies

I'm getting the following in my console. I just checked, and found that the same appears in the beginning of the console from
a release build of 1.4.

Input Init:
Basic mouse capture failed to enable!

Later in the console from the release build, the correct message that the mouse capture did enable successfully appears.
Unfortunately I'm not getting the second messsage in my project, and the mouse capture is definately not enabled.

If anyone has any idea what calls I need to make to enable mouse capture, or if there is a way to easily fix the first try to enable it in the console I would appreciate it.

#1
11/29/2005 (9:45 pm)
Just to clarify:
1. what version of MacOSX are you running ?
2. what version of Xcode are you using ?
3. is the mouse working at all in your build ?
#2
11/29/2005 (11:59 pm)
I'm also seeing that error, but at the beginning of console log. I'm using the pre-compiled example application.

Also if I click on a internet link (News for example) then click back on the application, the engine will reopen the web browser, the only way around this is to click and drag, before the application will reaccept the mouse input. That states Basic mouse capture enabled
#3
11/30/2005 (9:02 am)
Mac OS 10.4.3. XCode 2.1.

The mouse works fine, as I said, it looks like the mouse enable call is called later in the code again. It's just the first attempt that fails. Unfortunately whatever code is calling it again is not present in my project.

I traced the code, and it looks like the first call could not possibly succeed, as there is a variable called smActive which is set to false in input::init, and then checked a short while later in activateMouse without ever being set to true.

My question is just, can I make the first call work, or should I find out what the second call is, and add it to my code.
#4
11/30/2005 (9:12 am)
I've also had that error for a long time...I'm using the same versions as Steve. But I've never noticed a problem with using the mouse, so I've just ignored it.
#5
12/01/2005 (1:28 am)
Oh, ok..
Hey, I thought you might have something that was actually making the mouse not *work* in Torque.

That's a bogus little report that's been there for ages. If the mouse works, then the mouse works.

If you want to see the messages, you can use the console functions enableMouse() and disableMouse().
Note that they don't really do anything noticeable.
Basically, this is some strange old cruft from the original mac port that will probably be ripped out.

The mouse is 'captured' in installCarbonEventHandlers(), when we tell the OS what events we want to listen to, and where to send them.

Share and Enjoy.

/Paul
#6
12/01/2005 (1:53 am)
I appear to have a problem with the mouse, not so much not working, but unexpected results.

Using the pre-compiled examples from the archive, Torque SDK/examples/Torque Demo OSX. I run this application just fine. Now most of the mouse functions work fine, however if I click on the News icon (for example) it will open a new web page. Good, now I close this page and click anywhere in the Torque Demo OSX window (which doesn't have a title BTW) except for the minimize button, it will open a new browser window pointing to the same page it opened before.

Does anyone else see this issue?
#7
12/01/2005 (9:08 am)
@paul,

As I mentioned several times, the mouse is not working in my project. I had thought, that this had something to do with the error message that we're talking about, but I realize from your post that this is probably not the case. I am using a different mechanism for mouse capture then the installed carbon event handlers, and something in my mechanism must have broken with 1.4.
#8
12/02/2005 (4:39 pm)
Ok, what mechanism are you using?
#9
12/02/2005 (5:05 pm)
Got it working today. My project uses the TGE engine as a window in a second application, so I don't install the handlers. Instead I am passing the events to the TGE code from the main app.