Hey there. I'm trying to use the guide provided in the tutorial, but I have a small problem. I'm using Eclipse under Linux, and when I try to compile, I get the following error:
Severity and Description Path Resource Location Creation Time Id
error: ‘struct irr::SIrrlichtCreationParameters’ has no member named ‘IgnoreInput’ Oistest main.cpp line 429 1229576118430 1328
I tried using both 1.4 and 1.4.2 versions, and I got the same error with them. So, what am I doing wrong?
Proud member of the Online Campaign for Real English. If you believe in capital letters, correct spelling and good sentence structure then copy this into your signature.
It worked with Irrlicht 1.5, but now, I have another problem. I run the program, but the Joystick isn't being recognized. I also was checking the code, and I can't find where the "direction" of the joystick is stated. I mean, in other applications I have used, I had to state where the Joystick event handler was (like adding the argument "/dev/input/js0" in the command line, for example). Does OIS locate automatically the joystick device? Or that's the reason why the program isn't recognizing my joystick?
Proud member of the Online Campaign for Real English. If you believe in capital letters, correct spelling and good sentence structure then copy this into your signature.
Magus_Stragus wrote:I run the program, but the Joystick isn't being recognized. I also was checking the code, and I can't find where the "direction" of the joystick is stated. I mean, in other applications I have used, I had to state where the Joystick event handler was (like adding the argument "/dev/input/js0" in the command line, for example).
Great, thanks for reporting this. Lunix, right?
CIrrDeviceLinux::activateJoysticks()
We check:
/dev/jsX
/dev/input/jsX
Where 0 <= X < 31. On my Ubuntu 8.10 insteall, I'm finding the joystick a /dev/input/js0. If you're having problems, then any information that you can provide about where your joystick device actually is would be great.
I tried to put it in the main(), but it gives me errors.
And yes, the joystick is in /dev/input/js0.
Proud member of the Online Campaign for Real English. If you believe in capital letters, correct spelling and good sentence structure then copy this into your signature.
What is the core::array< SJoystickInfo > &joystickInfo?
Proud member of the Online Campaign for Real English. If you believe in capital letters, correct spelling and good sentence structure then copy this into your signature.
core::array<SJoystickInfo> joystickInfo;
if(device->activateJoysticks(joystickInfo))
{
std::cout << "Joystick support is enabled and " << joystickInfo.size() << " joystick(s) are present." << std::endl;
for(u32 joystick = 0; joystick < joystickInfo.size(); ++joystick)
{
// and so on
Is that causing you problems with you try something similar in your app? If so, can you please be specific about the problems that you are experiencing.
Ah, I didn't know there was a tutorial for that. As I am used to version 1.4, I didn't know about it.
But still, after I do that, it says me that joystick support is enable, but that there are no joysticks. Why is this happening!? T_T
Proud member of the Online Campaign for Real English. If you believe in capital letters, correct spelling and good sentence structure then copy this into your signature.
Though that method didn't work, you are right regarding the permissions. As I couldn't find a way to run as superuser through Eclipse, I had to compile everything on the console. Well, now the application recognizes the joystick, but it isn't reading the events, nor the force feedback support... -_-U Lucky me...
Any roads, any help regarding this? I wanted to try this on Windows, but for some reason I can't get to compile OIS (I tried Code::Blocks and VC++, but there were certain errors that didn't allow me to compile it.)
Proud member of the Online Campaign for Real English. If you believe in capital letters, correct spelling and good sentence structure then copy this into your signature.
Durrr, sorry, I completely missed that you were having a problem with OIS joystick handling. I thought that you were reporting a bug in Irrlicht 1.5's joystick handling that you weren't seeing in OIS.
1. Which Linux distribution are you using?
2. Did you add your account to the "games" group?
3. What are the permissions set to on all /dev/input/eventX?
4. If your Joystick is USB, are the permissions changing when you plug it in?
Also, what errors are you getting when you try to compile on Windows?
Last edited by pc0de on Sun Dec 21, 2008 7:17 am, edited 1 time in total.
First, I can't use it on Windows, due to my inability to compile OIS. So I have to use Ubuntu 8.04. I did add the group games, and I did add my account as part of that group, and added the joystick rule also. And that didn't work (it still didn't recognized me the joystick). So, I compile it on the console, using sudo to run it, and it recognized me the joystick, but it didn't read me any input event, nor it recognized me the force feedback (which I'm pretty sure I have it, as I tested it with some other code).
So, what am I doing wrong?
Proud member of the Online Campaign for Real English. If you believe in capital letters, correct spelling and good sentence structure then copy this into your signature.