VirtualBox

Ignore:
Timestamp:
Jun 29, 2009 3:20:27 PM (15 years ago)
Author:
vboxsync
Message:

VBoxSDL: make OpenGL work

File:
1 edited

Legend:

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

    r20433 r21029  
    4646#include "Framebuffer.h"
    4747#include "Ico64x01.h"
     48
     49#if defined(RT_OS_WINDOWS) || defined(RT_OS_LINUX)
     50#include <SDL_syswm.h>           /* for SDL_GetWMInfo() */
     51#endif
    4852
    4953#if defined(VBOX_WITH_XPCOM)
     
    864868     */
    865869    mScreen = SDL_SetVideoMode(newWidth, newHeight, 0, sdlFlags);
     870
     871    /*
     872     * Set the Window ID. Currently used for OpenGL accelerated guests.
     873     */
     874# if defined (RT_OS_WINDOWS)
     875    SDL_SysWMinfo info;
     876    SDL_VERSION(&info.version);
     877    if (SDL_GetWMInfo(&info))
     878        mWinId = (ULONG64) info.window;
     879# elif defined (RT_OS_LINUX)
     880    SDL_SysWMinfo info;
     881    SDL_VERSION(&info.version);
     882    if (SDL_GetWMInfo(&info))
     883        mWinId = (ULONG64) info.info.x11.wmwindow;
     884# else
     885    /* XXX ignore this for other architectures */
     886# endif
    866887#endif
    867888#ifdef VBOX_SECURELABEL
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