On mouses and input focus

Everything about development and the OpenMW source code.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: On mouses and input focus

Post by scrawl »

AngleBracket wrote: So... should we have hardware cursors,
Yes please.
HiPhish
Posts: 323
Joined: 02 Jul 2012, 08:36

Re: On mouses and input focus

Post by HiPhish »

I don't know what "hardware cursor" exactly means, but for me the ideal solution would be if whenever the cursor is visible, i.e. when I right-click to bring up the menus, during dialogue, when I press ESC or at any other time when I can't control the camera, the game uses the same mouse acceleration as the system. This is what the user is used to from the interface of their computer during everyday work. There is no need to change the sensitivity of the mouse since this mode should feel just like the OS.
Now, whenever I can move the camera the mouse should be linear and in this case a sensitivity slider would be a good idea. Even if someone has a perfectly linear mouse for their everyday use that doesn't mean the speed of the cursor is appropriate for camera movement.

I don't understand the technical details, so you guys have the last say in it. If it can't be done I'd be fine with the way it was in the riginal game. I don't know of any game that has actually considered this issue, I always have mouse acceleration in games. I understand that it's not such a big deal on Windows where the mouse in more linear, but even there people complain if they can't get rid of the acceleration. The thing with Morrowind is that it is heavy both on the first person camera and the menus, so either way one aspect of the game will feel off for me.
User avatar
AngleBracket
Posts: 32
Joined: 01 Jan 2013, 02:53

Re: On mouses and input focus

Post by AngleBracket »

HiPhish wrote:the ideal solution would be if whenever the cursor is visible, i.e. when I right-click to bring up the menus, during dialogue, when I press ESC or at any other time when I can't control the camera, the game uses the same mouse acceleration as the system. This is what the user is used to from the interface of their computer during everyday work. There is no need to change the sensitivity of the mouse since this mode should feel just like the OS.
Now, whenever I can move the camera the mouse should be linear and in this case a sensitivity slider would be a good idea. Even if someone has a perfectly linear mouse for their everyday use that doesn't mean the speed of the cursor is appropriate for camera movement.
That should be the current behaviour in the sdl_input branch (I can't say for sure about OS X, but it's definitely the case under Linux with XInput2.) System settings for sensitivity and acceleration when we're in menus, no acceleration with configurable sensitivity for when we're not in menus.

I haven't seen anyone disagree with this behaviour so far, so I've disabled the effects of the UI cursor sensitivity slider (not the mouselook sensitivity) to keep things simple. If we're not using a cursor sensitivity different from the system's we're in menus, then we have no reason not to use hardware cursors! Yay!
User avatar
AngleBracket
Posts: 32
Joined: 01 Jan 2013, 02:53

Re: On mouses and input focus

Post by AngleBracket »

After a bit of playing around, it looks like SDL2 isn't going to fit our needs. The sdl_input branch mostly works as intended under Linux, but even simple programs using SDL2 have non-trivial bugs under Windows. Unfortunately, I don't think using SDL 1.2 is an option either, since it has the same issues with keyboard grabbing under Linux as OIS has.

SDL might be an option later, but it looks like there isn't much attention being paid to Windows at this point in the development cycle, and using it now would cause more problems than it would solve.

I'm going to look at fixing up OIS by switching away from platform-specific solution files and adding the functionality we need instead. I figured out how to do the critical things like non-blocking keyboard input from the SDL source code, so hopefully I can improve OIS to where it fits our needs :).
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: On mouses and input focus

Post by scrawl »

:/

Have you considered to use SDL2 on linux, and SDL1.2 on windows?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: On mouses and input focus

Post by Zini »

Please lets not get into that. Using two different variants of SDL will make maintenance across platforms even harder. I think a modified OIS would be sufficient for now. We can replace it another time, once the SDL problems are out of the way.
User avatar
AngleBracket
Posts: 32
Joined: 01 Jan 2013, 02:53

Re: On mouses and input focus

Post by AngleBracket »

scrawl wrote::/

Have you considered to use SDL2 on linux, and SDL1.2 on windows?
The problem with that would be that there were some significant changes to the API between SDL 1.2 and SDL 2. Even under Linux, I don't know if the Joystick support in SDL2 is there yet, and I've spent most of my time working around bugs in unrelated subsystems just to get input working.

I'll shelve what I have for when SDL2 matures, but rather than risk creating a maintenance nightmare by having to support two input backends, sticking with what we already know (sort of) works across platforms is probably a better idea. It shouldn't matter though, the only functionality I can't easily replicate is cross-platform hardware cursor support.
HiPhish
Posts: 323
Joined: 02 Jul 2012, 08:36

Re: On mouses and input focus

Post by HiPhish »

Does that mean my idea of two different cursors is out of question until th SDL 2 bugs get fixed? (not complaining, just wondering)
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: On mouses and input focus

Post by sirherrbatka »

any progress on this?
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: On mouses and input focus

Post by scrawl »

This might be relevant in case someone wants to try SDL again: http://www.ogre3d.org/forums/viewtopic. ... 27#p489727
Post Reply