VirtualBox

Ticket #2762 (new enhancement)

Opened 5 years ago

Last modified 2 years ago

Mouse integration should be disabled when entering OpenGL mode

Reported by: Technologov Owned by:
Priority: major Component: 3D support
Version: VirtualBox 3.0.12 Keywords:
Cc: Guest type: Windows
Host type: other

Description

When entering OpenGL Full-Screen mode, please disable Mouse integration by default.

It is incompatible with all OpenGL games anyway. OpenGL games behave very badly otherwise. The mouse cursor becomes "jumpy" and jumps across the screen.

This is because "mouse integration" coordinates are absolute (like Tablet device), while OpenGL games expect relative behavior (like mouse/gamepad).

To reproduce, simply try to start any of the following games: Unreal Tournament 99 Serious Sam 1

I thought that it can be extended to all Full-screen applications, but many of those are 2D applications that are compatible with mouse integration. But for OpenGL games it is very problematic.

-Technologov, 17.12.2008

Change History

comment:1 Changed 5 years ago by frank

  • Component changed from guest additions to 3D support

comment:2 Changed 5 years ago by Technologov

I have found one exception: Warcraft III (when running in OpenGL mode) - it works fine with both Full-Screen, OpenGL 3D, and Mouse integration just fine.

Perhaps it requires some more thought.

Do we have any idea of a smart compromise ?

-Technologov, 18.12.2008

comment:3 Changed 5 years ago by leonid

Apart from WC3, there're other applications like Autocad, 3d studio max, Maya etc. Which could be run in full screen mode and should work just fine. The issue is with first person shooter like games only.

comment:4 Changed 5 years ago by uwgandalf

@Technologov I've been trying to run UT99 too, but it hangs when trying to get in-game (standard xp error) The 3d intro with the sewer and all does work in opengl. Strange thing is that it does go ingame with software rendering.

comment:5 Changed 5 years ago by Technologov

uwgandalf: you have reported the crash in your bug:

 http://www.virtualbox.org/ticket/2791

I say again - here UT works fine. Let's discuss your problem on that bug.

comment:6 Changed 5 years ago by weblionx

This still happens, as an example with QuakeLive, using Windows XP as a guest and Ubuntu 9.04 as a host, with VB 2.2.4.

comment:7 Changed 5 years ago by Technologov

weblionx: What happens? Mouse integration is on ?

Leonid says there are reasons for it, and I partially agree with him.

-Technologov

comment:8 Changed 5 years ago by weblionx

With mouse integration on, the cursor in QuakeLive tends to jump to an edge of the screen, and it's very hard to click on any button. If you change the in_mode in QL to -1, it acts differently, but still virtually impossible to use.

With mouse integration off, the cursor acts normally.

(Mind you the game has performance problems in the VM regardless of the setting, but that's not related to this.)

I imagine an addition to guest additions could be able to fix this, by having a program that either disables mouse integration, or toggles translating absolute positioning to relative positioning. Or perhaps this can be done automatically with OpenGL drivers, so programs that use OpenGL (Since it seems to be pointing to those being the programs that have problems) automatically get the correct input type.

comment:9 Changed 5 years ago by Technologov

weblionx: I wonder if you have read this thread at all ?!

-Technologov

comment:10 Changed 5 years ago by Technologov

I have new idea: When some guest app either goes full screen -or- starts OpenGL (either windowed mode or full screen), VBox must use pop-up to ask whenever to disable mouse integration or continue working.

This seems to be the best solution of all worlds.

-Technologov

comment:11 Changed 5 years ago by Technologov

Another idea is to make a community-list of seamless-mode incompatible windows Games & Apps. List of checksums or MD5's. If an app with one of those MD5 is started, disable Mouse Integration automatically. NVIDIA uses similar approach in their drivers to optimize for specific games.

-Technologov

comment:12 Changed 5 years ago by Technologov

OOps... earlier I meant not seamless-mode, but mouse-integrated mode.. Plus those two ideas can be combined.

-Technologov

comment:13 Changed 5 years ago by leonid

Yep, something like this would work.

comment:14 Changed 4 years ago by Technologov

So... Let's take it to a logical conclusion.

Please add a dialog, which asks user whenever to leave MI and stay in MI mode when OpenGL (windowed or full-screen) or Full-screen DirectDraw app is launched.

Later, I will create a small database of MD5 sums for apps that are known to work with MI and apps that are known to conflict with MI. For those "known" apps, no dialog should appear, and choice will be automatic. (I will create both white list and black list)

-Technologov, 25.11.2009.

comment:15 Changed 4 years ago by Technologov

Please change bug to enhancement. Change host from Windows to Other. VBox version can also be updated.

comment:16 Changed 4 years ago by frank

  • Host type changed from Windows to other
  • Version changed from VirtualBox 2.1.0 to VirtualBox 3.0.12
  • Type changed from defect to enhancement

comment:17 Changed 4 years ago by Svenstaro

I still think this should be fixed :)

comment:18 Changed 4 years ago by Technologov

Well, the original reporter (me) has changed his mind. Read above why.

I think that fix must be a smart one, not a trivial one, to handle all use cases correctly.

-Technologov

comment:19 Changed 4 years ago by Svenstaro

Well, manually disabling pointer integration would be fine but once X starts up, CTRL-I is grayed out and doesn't work anymore. Is this another bug? It works during bootup.

comment:20 Changed 4 years ago by Technologov

Found a related bug #2636

-Technologov

comment:21 Changed 2 years ago by rcs-34

Hello,

I have "solved" the problem with mouse integration in fullscreen mode. It is not very nice, but works for me well. I have modified UIMouseHandler to simply disable integration when in fullscreen mode.

/* Factory function to create mouse-handler: */
UIMouseHandler* UIMouseHandler::create(UIMachineLogic *pMachineLogic,
                                       UIVisualStateType visualStateType)
{
    /* Prepare mouse-handler: */
    UIMouseHandler *pMouseHandler = 0;
    /* Depending on visual-state type: */
    switch (visualStateType)
    {
        /* For now all the states using common mouse-handler: */
        case UIVisualStateType_Fullscreen:
            pMouseHandler = new UIMouseHandler(pMachineLogic);
            /* Disable integration in fullscreen mode */
            pMouseHandler->setMouseIntegrationEnabled(false);    
            break;
        case UIVisualStateType_Normal:
        case UIVisualStateType_Seamless:
        case UIVisualStateType_Scale:
            pMouseHandler = new UIMouseHandler(pMachineLogic);
            /* Enable integration in fullscreen mode */
            pMouseHandler->setMouseIntegrationEnabled(true); 
            break;
        default:
            break;
    }
    /* Return prepared mouse-handler: */
    return pMouseHandler;
}

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use