VirtualBox

Ignore:
Timestamp:
Jun 17, 2013 2:32:51 PM (12 years ago)
Author:
vboxsync
Message:

updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/directx.c

    r46521 r46593  
    51215121}
    51225122
     5123/**
     5124 * Loads a system DLL.
     5125 *
     5126 * @returns Module handle or NULL
     5127 * @param   pszName             The DLL name.
     5128 */
     5129static HMODULE loadSystemDll(const char *pszName)
     5130{
     5131    char   szPath[MAX_PATH];
     5132    UINT   cchPath = GetSystemDirectoryA(szPath, sizeof(szPath));
     5133    size_t cbName  = strlen(pszName) + 1;
     5134    if (cchPath + 1 + cbName > sizeof(szPath))
     5135        return NULL;
     5136    szPath[cchPath] = '\\';
     5137    memcpy(&szPath[cchPath + 1], pszName, cbName);
     5138    return LoadLibraryA(szPath);
     5139}
     5140
    51235141/* Do not call while under the GL lock. */
    51245142static BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, UINT ordinal)
     
    51425160#ifdef USE_WIN32_OPENGL
    51435161    {
    5144 #ifndef VBOX
     5162# ifndef VBOX
    51455163        HMODULE mod_gl = GetModuleHandleA("opengl32.dll");
    5146 #else
     5164# else
    51475165        BOOL (APIENTRY *pDrvValidateVersion)(DWORD) DECLSPEC_HIDDEN;
    5148 # ifdef VBOX_WDDM_WOW64
    5149         HMODULE mod_gl = LoadLibraryA("VBoxOGL-x86.dll");
    5150 # else
    5151         HMODULE mod_gl = LoadLibraryA("VBoxOGL.dll");
    5152 # endif
     5166#  ifdef VBOX_WDDM_WOW64
     5167        HMODULE mod_gl = loadSystemDll("VBoxOGL-x86.dll");
     5168#  else
     5169        HMODULE mod_gl = loadSystemDll("VBoxOGL.dll");
     5170#  endif
    51535171        if (!mod_gl)
    51545172        {
     
    51695187        }
    51705188
    5171 # define VBOX_USE_FUNC(f) p##f = (void *)GetProcAddress(mod_gl, #f);
     5189#  define VBOX_USE_FUNC(f) p##f = (void *)GetProcAddress(mod_gl, #f);
    51725190        VBOX_GL_FUNCS_GEN
    5173 # undef VBOX_USE_FUNC
    5174 #endif
    5175 #define USE_GL_FUNC(f) gl_info->gl_ops.gl.p_##f = (void *)GetProcAddress(mod_gl, #f);
     5191#  undef VBOX_USE_FUNC
     5192# endif
     5193# define USE_GL_FUNC(f) gl_info->gl_ops.gl.p_##f = (void *)GetProcAddress(mod_gl, #f);
    51765194        ALL_WGL_FUNCS
    5177 #undef USE_GL_FUNC
     5195# undef USE_GL_FUNC
    51785196        gl_info->gl_ops.wgl.p_wglSwapBuffers = (void *)GetProcAddress(mod_gl, "wglSwapBuffers");
    51795197    }
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