Changeset 23571 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_main.c
- Timestamp:
- Oct 6, 2009 6:07:06 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 53228
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_main.c
r22496 r23571 6 6 * Copyright 2004 Jason Edmeades 7 7 * Copyright 2007-2008 Stefan Dösinger for CodeWeavers 8 * Copyright 2009 Henri Verbeet for CodeWeavers 8 9 * 9 10 * This library is free software; you can redistribute it and/or … … 42 43 void (*CDECL wine_tsx11_unlock_ptr)(void) = NULL; 43 44 45 static CRITICAL_SECTION wined3d_cs; 46 static 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 }; 53 static CRITICAL_SECTION wined3d_cs = {&wined3d_cs_debug, -1, 0, 0, 0, 0}; 44 54 45 55 /* When updating default value here, make sure to update winecfg as well, 46 56 * where appropriate. */ 47 wined3d_settings_t wined3d_settings = 57 wined3d_settings_t wined3d_settings = 48 58 { 49 59 VS_HW, /* Hardware by default */ 50 60 PS_HW, /* Hardware by default */ 51 VBO_HW, /* Hardware by default */52 61 TRUE, /* Use of GLSL enabled by default */ 53 62 ORM_FBO, /* Use FBOs to do offscreen rendering */ 54 RTL_ AUTO, /* Automatically determine best locking method */63 RTL_READTEX, /* Default render target locking method */ 55 64 PCI_VENDOR_NONE,/* PCI Vendor ID */ 56 65 PCI_DEVICE_NONE,/* PCI Device ID */ … … 206 215 } 207 216 } 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 }221 217 if ( !get_config_key( hkey, appkey, "UseGLSL", buffer, size) ) 222 218 { … … 261 257 TRACE("Using glReadPixels for render target reading and textures for writing\n"); 262 258 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;273 259 } 274 260 } … … 318 304 if ( !get_config_key( hkey, appkey, "WineLogo", buffer, size) ) 319 305 { 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); 322 311 } 323 312 if ( !get_config_key( hkey, appkey, "Multisampling", buffer, size) ) … … 334 323 if (wined3d_settings.ps_mode == PS_NONE) 335 324 TRACE("Disable pixel shaders\n"); 336 if (wined3d_settings.vbo_mode == VBO_NONE)337 TRACE("Disable Vertex Buffer Hardware support\n");338 325 if (wined3d_settings.glslRequested) 339 326 TRACE("If supported by your system, GL Shading Language will be used\n"); … … 361 348 } 362 349 350 void WINAPI wined3d_mutex_lock(void) 351 { 352 EnterCriticalSection(&wined3d_cs); 353 } 354 355 void WINAPI wined3d_mutex_unlock(void) 356 { 357 LeaveCriticalSection(&wined3d_cs); 358 } 359 363 360 /* At process attach */ 364 361 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
Note:
See TracChangeset
for help on using the changeset viewer.