VirtualBox

Changeset 11400 in vbox for trunk


Ignore:
Timestamp:
Aug 13, 2008 4:44:09 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
34689
Message:

VBoxSDL: improve fullscreenresize hack a little bit

Location:
trunk/src/VBox/Frontends/VBoxSDL
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp

    r10675 r11400  
    952952
    953953/**
    954  *
    955  */
    956 void VBoxSDLFB::getFullScreenGeometry(uint32_t *width, uint32_t *height)
     954 * Return the geometry of the host. This isn't very well tested but it seems
     955 * to work at least on Linux hosts.
     956 */
     957void VBoxSDLFB::getFullscreenGeometry(uint32_t *width, uint32_t *height)
    957958{
    958959    SDL_Rect **modes;
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h

    r10675 r11400  
    125125    int  getXOffset();
    126126    int  getYOffset();
    127     void getFullScreenGeometry(uint32_t *width, uint32_t *height);
     127    void getFullscreenGeometry(uint32_t *width, uint32_t *height);
    128128    uint32_t getGuestXRes() { return mGuestXRes; }
    129129    uint32_t getGuestYRes() { return mGuestYRes; }
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r10797 r11400  
    49034903    {
    49044904        /*
    4905          * The old/default way: SDL will resize the host to fit the guest
    4906          * screen resolution.
     4905         * The old/default way: SDL will resize the host to fit the guest screen resolution.
    49074906         */
    49084907        gpFrameBuffer->setFullscreen(enable);
     
    49114910    {
    49124911        /*
    4913          * Just switch to fullscreen and adapt the guest screen resolution
    4914          * to the host window geometry.
     4912         * The alternate way: Switch to fullscreen with the host screen resolution and adapt
     4913         * the guest screen resolution to the host window geometry.
    49154914         */
    49164915        uint32_t NewWidth = 0, NewHeight = 0;
    4917         if (!gpFrameBuffer->getFullscreen())
    4918         {
     4916        if (enable)
     4917        {
     4918            /* switch to fullscreen */
    49194919            gmGuestNormalXRes = gpFrameBuffer->getGuestXRes();
    49204920            gmGuestNormalYRes = gpFrameBuffer->getGuestYRes();
    4921             gpFrameBuffer->getFullScreenGeometry(&NewWidth, &NewHeight);
     4921            gpFrameBuffer->getFullscreenGeometry(&NewWidth, &NewHeight);
    49224922        }
    49234923        else
    49244924        {
     4925            /* switch back to saved geometry */
    49254926            NewWidth  = gmGuestNormalXRes;
    49264927            NewHeight = gmGuestNormalYRes;
Note: See TracChangeset for help on using the changeset viewer.

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