VirtualBox

Opened 16 years ago

Closed 8 years ago

#2762 closed enhancement (obsolete)

Mouse integration should be disabled when entering OpenGL mode

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

Description (last modified by aeichner)

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 (22)

comment:1 by Frank Mehnert, 16 years ago

Component: guest additions3D support

comment:2 by Technologov, 16 years ago

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 by Leonid Lobachev, 16 years ago

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 by hans, 16 years ago

@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 by Technologov, 16 years ago

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 by weblionx, 15 years ago

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 by Technologov, 15 years ago

weblionx: What happens? Mouse integration is on ?

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

-Technologov

comment:8 by weblionx, 15 years ago

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 by Technologov, 15 years ago

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

-Technologov

comment:10 by Technologov, 15 years ago

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 by Technologov, 15 years ago

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 by Technologov, 15 years ago

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

-Technologov

comment:13 by Leonid Lobachev, 15 years ago

Yep, something like this would work.

comment:14 by Technologov, 15 years ago

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 by Technologov, 15 years ago

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

comment:16 by Frank Mehnert, 15 years ago

Host type: Windowsother
Type: defectenhancement
Version: VirtualBox 2.1.0VirtualBox 3.0.12

comment:17 by Sven-Hendrik Haase, 14 years ago

I still think this should be fixed :)

comment:18 by Technologov, 14 years ago

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 by Sven-Hendrik Haase, 14 years ago

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 by Technologov, 14 years ago

Found a related bug #2636

-Technologov

comment:21 by rcs-34, 13 years ago

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;
}

comment:22 by aeichner, 8 years ago

Description: modified (diff)
Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette