VirtualBox

Ignore:
Timestamp:
Oct 6, 2009 6:07:06 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53228
Message:

crOpenGL: update to wine 1.1.30

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_main.c

    r22496 r23571  
    66 * Copyright 2004      Jason Edmeades
    77 * Copyright 2007-2008 Stefan Dösinger for CodeWeavers
     8 * Copyright 2009 Henri Verbeet for CodeWeavers
    89 *
    910 * This library is free software; you can redistribute it and/or
     
    4243void (*CDECL wine_tsx11_unlock_ptr)(void) = NULL;
    4344
     45static CRITICAL_SECTION wined3d_cs;
     46static CRITICAL_SECTION_DEBUG wined3d_cs_debug =
     47{
     48    0, 0, &wined3d_cs,
     49    {&wined3d_cs_debug.ProcessLocksList,
     50    &wined3d_cs_debug.ProcessLocksList},
     51    0, 0, {(DWORD_PTR)(__FILE__ ": wined3d_cs")}
     52};
     53static CRITICAL_SECTION wined3d_cs = {&wined3d_cs_debug, -1, 0, 0, 0, 0};
    4454
    4555/* When updating default value here, make sure to update winecfg as well,
    4656 * where appropriate. */
    47 wined3d_settings_t wined3d_settings = 
     57wined3d_settings_t wined3d_settings =
    4858{
    4959    VS_HW,          /* Hardware by default */
    5060    PS_HW,          /* Hardware by default */
    51     VBO_HW,         /* Hardware by default */
    5261    TRUE,           /* Use of GLSL enabled by default */
    5362    ORM_FBO,        /* Use FBOs to do offscreen rendering */
    54     RTL_AUTO,       /* Automatically determine best locking method */
     63    RTL_READTEX,    /* Default render target locking method */
    5564    PCI_VENDOR_NONE,/* PCI Vendor ID */
    5665    PCI_DEVICE_NONE,/* PCI Device ID */
     
    206215            }
    207216        }
    208         if ( !get_config_key( hkey, appkey, "VertexBufferMode", buffer, size) )
    209         {
    210             if (!strcmp(buffer,"none"))
    211             {
    212                 TRACE("Disable Vertex Buffer Hardware support\n");
    213                 wined3d_settings.vbo_mode = VBO_NONE;
    214             }
    215             else if (!strcmp(buffer,"hardware"))
    216             {
    217                 TRACE("Allow Vertex Buffer Hardware support\n");
    218                 wined3d_settings.vbo_mode = VBO_HW;
    219             }
    220         }
    221217        if ( !get_config_key( hkey, appkey, "UseGLSL", buffer, size) )
    222218        {
     
    261257                TRACE("Using glReadPixels for render target reading and textures for writing\n");
    262258                wined3d_settings.rendertargetlock_mode = RTL_READTEX;
    263             }
    264             else if (!strcmp(buffer,"texdraw"))
    265             {
    266                 TRACE("Using textures for render target reading and glDrawPixels for writing\n");
    267                 wined3d_settings.rendertargetlock_mode = RTL_TEXDRAW;
    268             }
    269             else if (!strcmp(buffer,"textex"))
    270             {
    271                 TRACE("Reading render targets via textures and writing via textures\n");
    272                 wined3d_settings.rendertargetlock_mode = RTL_TEXTEX;
    273259            }
    274260        }
     
    318304        if ( !get_config_key( hkey, appkey, "WineLogo", buffer, size) )
    319305        {
    320             wined3d_settings.logo = HeapAlloc(GetProcessHeap(), 0, strlen(buffer) + 1);
    321             if(wined3d_settings.logo) strcpy(wined3d_settings.logo, buffer);
     306            size_t len = strlen(buffer) + 1;
     307
     308            wined3d_settings.logo = HeapAlloc(GetProcessHeap(), 0, len);
     309            if (!wined3d_settings.logo) ERR("Failed to allocate logo path memory.\n");
     310            else memcpy(wined3d_settings.logo, buffer, len);
    322311        }
    323312        if ( !get_config_key( hkey, appkey, "Multisampling", buffer, size) )
     
    334323    if (wined3d_settings.ps_mode == PS_NONE)
    335324        TRACE("Disable pixel shaders\n");
    336     if (wined3d_settings.vbo_mode == VBO_NONE)
    337         TRACE("Disable Vertex Buffer Hardware support\n");
    338325    if (wined3d_settings.glslRequested)
    339326        TRACE("If supported by your system, GL Shading Language will be used\n");
     
    361348}
    362349
     350void WINAPI wined3d_mutex_lock(void)
     351{
     352    EnterCriticalSection(&wined3d_cs);
     353}
     354
     355void WINAPI wined3d_mutex_unlock(void)
     356{
     357    LeaveCriticalSection(&wined3d_cs);
     358}
     359
    363360/* At process attach */
    364361BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
Note: See TracChangeset for help on using the changeset viewer.

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