ReactOS 0.4.15-dev-5893-g1bb4167
wined3d_main.c
Go to the documentation of this file.
1/*
2 * Direct3D wine internal interface main
3 *
4 * Copyright 2002-2003 The wine-d3d team
5 * Copyright 2002-2003 Raphael Junqueira
6 * Copyright 2004 Jason Edmeades
7 * Copyright 2007-2008 Stefan Dösinger for CodeWeavers
8 * Copyright 2009 Henri Verbeet for CodeWeavers
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#include "config.h"
26#include "wine/port.h"
27
28#include "initguid.h"
29#include "wined3d_private.h"
30
33
35{
40};
41
43{
45 unsigned int count;
47};
48
50
53{
54 0, 0, &wined3d_cs,
57 0, 0, {(DWORD_PTR)(__FILE__ ": wined3d_cs")}
58};
59static CRITICAL_SECTION wined3d_cs = {&wined3d_cs_debug, -1, 0, 0, 0, 0};
60
63{
64 0, 0, &wined3d_wndproc_cs,
67 0, 0, {(DWORD_PTR)(__FILE__ ": wined3d_wndproc_cs")}
68};
70
71/* When updating default value here, make sure to update winecfg as well,
72 * where appropriate. */
74{
75 TRUE, /* Multithreaded CS by default. */
76 FALSE, /* explicit_gl_version */
77 MAKEDWORD_VERSION(1, 0), /* Default to legacy OpenGL */
78 TRUE, /* Use of GLSL enabled by default */
79 ORM_FBO, /* Use FBOs to do offscreen rendering */
80 PCI_VENDOR_NONE,/* PCI Vendor ID */
81 PCI_DEVICE_NONE,/* PCI Device ID */
82 0, /* The default of memory is set in init_driver_info */
83 NULL, /* No wine logo by default */
84 TRUE, /* Prefer multisample textures to multisample renderbuffers. */
85 ~0u, /* Don't force a specific sample count by default. */
86 FALSE, /* No strict draw ordering. */
87 FALSE, /* Don't range check relative addressing indices in float constants. */
88 ~0U, /* No VS shader model limit by default. */
89 ~0U, /* No HS shader model limit by default. */
90 ~0U, /* No DS shader model limit by default. */
91 ~0U, /* No GS shader model limit by default. */
92 ~0U, /* No PS shader model limit by default. */
93 ~0u, /* No CS shader model limit by default. */
94 FALSE, /* 3D support enabled by default. */
95};
96
98{
99 struct wined3d *object;
100 HRESULT hr;
101
102 if (!(object = heap_alloc_zero(FIELD_OFFSET(struct wined3d, adapters[1]))))
103 {
104 ERR("Failed to allocate wined3d object memory.\n");
105 return NULL;
106 }
107
110
111 hr = wined3d_init(object, flags);
112 if (FAILED(hr))
113 {
114 WARN("Failed to initialize wined3d object, hr %#x.\n", hr);
115 heap_free(object);
116 return NULL;
117 }
118
119 TRACE("Created wined3d object %p.\n", object);
120
121 return object;
122}
123
124static DWORD get_config_key(HKEY defkey, HKEY appkey, const char *name, char *buffer, DWORD size)
125{
126 if (appkey && !RegQueryValueExA(appkey, name, 0, NULL, (BYTE *)buffer, &size)) return 0;
127 if (defkey && !RegQueryValueExA(defkey, name, 0, NULL, (BYTE *)buffer, &size)) return 0;
129}
130
131static DWORD get_config_key_dword(HKEY defkey, HKEY appkey, const char *name, DWORD *value)
132{
134
135 size = sizeof(data);
136 if (appkey && !RegQueryValueExA(appkey, name, 0, &type, (BYTE *)&data, &size) && type == REG_DWORD) goto success;
137 size = sizeof(data);
138 if (defkey && !RegQueryValueExA(defkey, name, 0, &type, (BYTE *)&data, &size) && type == REG_DWORD) goto success;
139
141
142success:
143 *value = data;
144 return 0;
145}
146
148{
150 char buffer[MAX_PATH+10];
151 DWORD size = sizeof(buffer);
152 HKEY hkey = 0;
153 HKEY appkey = 0;
154 DWORD len, tmpvalue;
155 WNDCLASSA wc;
156
159 {
161 ERR("Failed to allocate context TLS index, err %#x.\n", err);
162 return FALSE;
163 }
165
166 /* We need our own window class for a fake window which we use to retrieve GL capabilities */
167 /* We might need CS_OWNDC in the future if we notice strange things on Windows.
168 * Various articles/posts about OpenGL problems on Windows recommend this. */
171 wc.cbClsExtra = 0;
172 wc.cbWndExtra = 0;
173 wc.hInstance = hInstDLL;
174 wc.hIcon = LoadIconA(NULL, (const char *)IDI_WINLOGO);
175 wc.hCursor = LoadCursorA(NULL, (const char *)IDC_ARROW);
176 wc.hbrBackground = NULL;
177 wc.lpszMenuName = NULL;
179
180 if (!RegisterClassA(&wc))
181 {
182 ERR("Failed to register window class 'WineD3D_OpenGL'!\n");
184 {
186 ERR("Failed to free context TLS index, err %#x.\n", err);
187 }
188 return FALSE;
189 }
190
192
193 /* @@ Wine registry key: HKCU\Software\Wine\Direct3D */
194 if ( RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Direct3D", &hkey ) ) hkey = 0;
195
197 if (len && len < MAX_PATH)
198 {
199 HKEY tmpkey;
200 /* @@ Wine registry key: HKCU\Software\Wine\AppDefaults\app.exe\Direct3D */
201 if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\AppDefaults", &tmpkey ))
202 {
203 char *p, *appname = buffer;
204 if ((p = strrchr( appname, '/' ))) appname = p + 1;
205 if ((p = strrchr( appname, '\\' ))) appname = p + 1;
206 strcat( appname, "\\Direct3D" );
207 TRACE("appname = [%s]\n", appname);
208 if (RegOpenKeyA( tmpkey, appname, &appkey )) appkey = 0;
209 RegCloseKey( tmpkey );
210 }
211 }
212
213 if (hkey || appkey)
214 {
215 if (!get_config_key_dword(hkey, appkey, "csmt", &wined3d_settings.cs_multithreaded))
216 ERR_(winediag)("Setting multithreaded command stream to %#x.\n", wined3d_settings.cs_multithreaded);
217 if (!get_config_key_dword(hkey, appkey, "MaxVersionGL", &tmpvalue))
218 {
219 ERR_(winediag)("Setting maximum allowed wined3d GL version to %u.%u.\n",
220 tmpvalue >> 16, tmpvalue & 0xffff);
223 }
224 if ( !get_config_key( hkey, appkey, "UseGLSL", buffer, size) )
225 {
226 if (!strcmp(buffer,"disabled"))
227 {
228 ERR_(winediag)("The GLSL shader backend has been disabled. You get to keep all the pieces if it breaks.\n");
229 TRACE("Use of GL Shading Language disabled\n");
231 }
232 }
233 if (!get_config_key(hkey, appkey, "OffscreenRenderingMode", buffer, size)
234 && !strcmp(buffer,"backbuffer"))
236 if ( !get_config_key_dword( hkey, appkey, "VideoPciDeviceID", &tmpvalue) )
237 {
238 int pci_device_id = tmpvalue;
239
240 /* A pci device id is 16-bit */
241 if(pci_device_id > 0xffff)
242 {
243 ERR("Invalid value for VideoPciDeviceID. The value should be smaller or equal to 65535 or 0xffff\n");
244 }
245 else
246 {
247 TRACE("Using PCI Device ID %04x\n", pci_device_id);
248 wined3d_settings.pci_device_id = pci_device_id;
249 }
250 }
251 if ( !get_config_key_dword( hkey, appkey, "VideoPciVendorID", &tmpvalue) )
252 {
253 int pci_vendor_id = tmpvalue;
254
255 /* A pci device id is 16-bit */
256 if(pci_vendor_id > 0xffff)
257 {
258 ERR("Invalid value for VideoPciVendorID. The value should be smaller or equal to 65535 or 0xffff\n");
259 }
260 else
261 {
262 TRACE("Using PCI Vendor ID %04x\n", pci_vendor_id);
263 wined3d_settings.pci_vendor_id = pci_vendor_id;
264 }
265 }
266 if ( !get_config_key( hkey, appkey, "VideoMemorySize", buffer, size) )
267 {
268 int TmpVideoMemorySize = atoi(buffer);
269 if(TmpVideoMemorySize > 0)
270 {
271 wined3d_settings.emulated_textureram = (UINT64)TmpVideoMemorySize *1024*1024;
272 TRACE("Use %iMiB = 0x%s bytes for emulated_textureram\n",
273 TmpVideoMemorySize,
275 }
276 else
277 ERR("VideoMemorySize is %i but must be >0\n", TmpVideoMemorySize);
278 }
279 if ( !get_config_key( hkey, appkey, "WineLogo", buffer, size) )
280 {
281 size_t len = strlen(buffer) + 1;
282
284 ERR("Failed to allocate logo path memory.\n");
285 else
287 }
288 if (!get_config_key_dword(hkey, appkey, "MultisampleTextures", &wined3d_settings.multisample_textures))
289 ERR_(winediag)("Setting multisample textures to %#x.\n", wined3d_settings.multisample_textures);
290 if (!get_config_key_dword(hkey, appkey, "SampleCount", &wined3d_settings.sample_count))
291 ERR_(winediag)("Forcing sample count to %u. This may not be compatible with all applications.\n",
293 if (!get_config_key(hkey, appkey, "StrictDrawOrdering", buffer, size)
294 && !strcmp(buffer,"enabled"))
295 {
296 ERR_(winediag)("\"StrictDrawOrdering\" is deprecated, please use \"csmt\" instead.\n");
297 TRACE("Enforcing strict draw ordering.\n");
299 }
300 if (!get_config_key(hkey, appkey, "CheckFloatConstants", buffer, size)
301 && !strcmp(buffer, "enabled"))
302 {
303 TRACE("Checking relative addressing indices in float constants.\n");
305 }
306 if (!get_config_key_dword(hkey, appkey, "MaxShaderModelVS", &wined3d_settings.max_sm_vs))
307 TRACE("Limiting VS shader model to %u.\n", wined3d_settings.max_sm_vs);
308 if (!get_config_key_dword(hkey, appkey, "MaxShaderModelHS", &wined3d_settings.max_sm_hs))
309 TRACE("Limiting HS shader model to %u.\n", wined3d_settings.max_sm_hs);
310 if (!get_config_key_dword(hkey, appkey, "MaxShaderModelDS", &wined3d_settings.max_sm_ds))
311 TRACE("Limiting DS shader model to %u.\n", wined3d_settings.max_sm_ds);
312 if (!get_config_key_dword(hkey, appkey, "MaxShaderModelGS", &wined3d_settings.max_sm_gs))
313 TRACE("Limiting GS shader model to %u.\n", wined3d_settings.max_sm_gs);
314 if (!get_config_key_dword(hkey, appkey, "MaxShaderModelPS", &wined3d_settings.max_sm_ps))
315 TRACE("Limiting PS shader model to %u.\n", wined3d_settings.max_sm_ps);
316 if (!get_config_key_dword(hkey, appkey, "MaxShaderModelCS", &wined3d_settings.max_sm_cs))
317 TRACE("Limiting CS shader model to %u.\n", wined3d_settings.max_sm_cs);
318 if (!get_config_key(hkey, appkey, "DirectDrawRenderer", buffer, size)
319 && !strcmp(buffer, "gdi"))
320 {
321 TRACE("Disabling 3D support.\n");
323 }
324 }
325
326 if (appkey) RegCloseKey( appkey );
327 if (hkey) RegCloseKey( hkey );
328
330
331 return TRUE;
332}
333
335{
337 unsigned int i;
338
340 {
342 ERR("Failed to free context TLS index, err %#x.\n", err);
343 }
344
345 for (i = 0; i < wndproc_table.count; ++i)
346 {
347 /* Trying to unregister these would be futile. These entries can only
348 * exist if either we skipped them in wined3d_unregister_window() due
349 * to the application replacing the wndproc after the entry was
350 * registered, or if the application still has an active wined3d
351 * device. In the latter case the application has bigger problems than
352 * these entries. */
353 WARN("Leftover wndproc table entry %p.\n", &wndproc_table.entries[i]);
354 }
355 heap_free(wndproc_table.entries);
356
359
362
364
365 return TRUE;
366}
367
369{
371}
372
374{
376}
377
379{
381}
382
384{
386}
387
389{
390 unsigned int i;
391
392 for (i = 0; i < wndproc_table.count; ++i)
393 {
394 if (wndproc_table.entries[i].window == window)
395 {
396 return &wndproc_table.entries[i];
397 }
398 }
399
400 return NULL;
401}
402
404{
405 struct wined3d_wndproc *entry;
406 struct wined3d_device *device;
407 BOOL unicode;
409
412
413 if (!entry)
414 {
416 ERR("Window %p is not registered with wined3d.\n", window);
418 }
419
420 device = entry->device;
421 unicode = entry->unicode;
422 proc = entry->proc;
424
425 if (device)
427 if (unicode)
430}
431
433{
434 struct wined3d_wndproc *entry;
435
437
439 {
441 WARN("Window %p is already registered with wined3d.\n", window);
442 return TRUE;
443 }
444
445 if (!wined3d_array_reserve((void **)&wndproc_table.entries, &wndproc_table.size,
446 wndproc_table.count + 1, sizeof(*entry)))
447 {
449 ERR("Failed to grow table.\n");
450 return FALSE;
451 }
452
453 entry = &wndproc_table.entries[wndproc_table.count++];
454 entry->window = window;
455 entry->unicode = IsWindowUnicode(window);
456 /* Set a window proc that matches the window. Some applications (e.g. NoX)
457 * replace the window proc after we've set ours, and expect to be able to
458 * call the previous one (ours) directly, without using CallWindowProc(). */
459 if (entry->unicode)
461 else
463 entry->device = device;
464
466
467 return TRUE;
468}
469
471{
472 struct wined3d_wndproc *entry, *last;
474
476
478 {
480 ERR("Window %p is not registered with wined3d.\n", window);
481 return;
482 }
483
484 if (entry->unicode)
485 {
488 {
489 entry->device = NULL;
491 WARN("Not unregistering window %p, window proc %#lx doesn't match wined3d window proc %p.\n",
493 return;
494 }
495
497 }
498 else
499 {
502 {
503 entry->device = NULL;
505 WARN("Not unregistering window %p, window proc %#lx doesn't match wined3d window proc %p.\n",
507 return;
508 }
509
511 }
512
513 last = &wndproc_table.entries[--wndproc_table.count];
514 if (entry != last) *entry = *last;
515
517}
518
520{
522}
523
524/* At process attach */
526{
527 switch (reason)
528 {
530 return wined3d_dll_init(inst);
531
533 if (!reserved)
534 return wined3d_dll_destroy(inst);
535 break;
536
539 {
540 ERR("Failed to clear current context.\n");
541 }
542 return TRUE;
543 }
544 return TRUE;
545}
unsigned long long UINT64
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define U(x)
Definition: wordpad.c:45
#define WARN(fmt,...)
Definition: debug.h:112
#define ERR(fmt,...)
Definition: debug.h:110
#define RegCloseKey(hKey)
Definition: registry.h:47
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
void context_set_tls_idx(DWORD idx)
Definition: context.c:1502
BOOL context_set_current(struct wined3d_context *ctx)
Definition: context.c:1512
static DWORD wined3d_context_tls_idx
Definition: context.c:48
DWORD context_get_tls_idx(void)
Definition: context.c:1497
LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL unicode, UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc)
Definition: device.c:5292
BOOL wined3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size)
Definition: utils.c:6526
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3257
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4027
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
#define CDECL
Definition: compat.h:29
#define DLL_THREAD_DETACH
Definition: compat.h:133
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
#define MAX_PATH
Definition: compat.h:34
#define WINE_DECLARE_DEBUG_CHANNEL(x)
Definition: compat.h:45
#define CALLBACK
Definition: compat.h:35
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
Definition: loader.c:539
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
DWORD WINAPI TlsAlloc(VOID)
Definition: thread.c:1100
BOOL WINAPI TlsFree(IN DWORD Index)
Definition: thread.c:1166
r reserved
Definition: btrfs.c:3006
BOOL wined3d_dxtn_init(void)
Definition: dxtn.c:461
void wined3d_dxtn_free(void)
Definition: dxtn.c:515
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
GLuint buffer
Definition: glext.h:5915
GLbitfield flags
Definition: glext.h:7161
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
POINT last
Definition: font.c:46
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
#define FAILED(hr)
Definition: intsafe.h:51
uint32_t entry
Definition: isohybrid.c:63
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
static UINT WPARAM wparam
Definition: combo.c:716
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
static IHTMLWindow2 * window
Definition: events.c:77
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
static HANDLE proc()
Definition: pdb.c:34
#define err(...)
#define REG_DWORD
Definition: sdbapi.c:596
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
#define ERR_(ch,...)
Definition: debug.h:156
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
LIST_ENTRY ProcessLocksList
Definition: winbase.h:883
HBRUSH hbrBackground
Definition: winuser.h:3160
HICON hIcon
Definition: winuser.h:3158
HINSTANCE hInstance
Definition: winuser.h:3157
HCURSOR hCursor
Definition: winuser.h:3159
int cbWndExtra
Definition: winuser.h:3156
UINT style
Definition: winuser.h:3153
LPCSTR lpszMenuName
Definition: winuser.h:3161
LPCSTR lpszClassName
Definition: winuser.h:3162
WNDPROC lpfnWndProc
Definition: winuser.h:3154
int cbClsExtra
Definition: winuser.h:3155
Definition: devices.h:37
Definition: tftpd.h:60
Definition: name.c:39
unsigned int max_sm_hs
unsigned int max_sm_vs
unsigned int cs_multithreaded
unsigned int multisample_textures
unsigned int max_sm_ps
unsigned int max_sm_cs
unsigned int max_sm_ds
unsigned int sample_count
unsigned int max_sm_gs
unsigned short pci_vendor_id
unsigned short pci_device_id
struct wined3d_wndproc * entries
Definition: wined3d_main.c:44
unsigned int count
Definition: wined3d_main.c:45
struct wined3d_device * device
Definition: wined3d_main.c:39
struct wined3d_adapter adapters[1]
#define GWLP_WNDPROC
Definition: treelist.c:66
#define DWORD_PTR
Definition: treelist.c:76
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
ULONG_PTR SIZE_T
Definition: typedefs.h:80
Definition: pdh_main.c:94
#define success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)
Definition: except.c:1040
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define TLS_OUT_OF_INDEXES
Definition: winbase.h:549
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
HRESULT wined3d_init(struct wined3d *wined3d, DWORD flags)
Definition: directx.c:6820
#define WINED3D_NO3D
Definition: wined3d.h:1316
static CRITICAL_SECTION_DEBUG wined3d_cs_debug
Definition: wined3d_main.c:52
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
struct wined3d *CDECL wined3d_create(DWORD flags)
Definition: wined3d_main.c:97
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
void CDECL wined3d_strictdrawing_set(int value)
Definition: wined3d_main.c:519
BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
Definition: wined3d_main.c:525
static struct wined3d_wndproc * wined3d_find_wndproc(HWND window)
Definition: wined3d_main.c:388
static DWORD get_config_key_dword(HKEY defkey, HKEY appkey, const char *name, DWORD *value)
Definition: wined3d_main.c:131
static CRITICAL_SECTION_DEBUG wined3d_wndproc_cs_debug
Definition: wined3d_main.c:62
static struct wined3d_wndproc_table wndproc_table
Definition: wined3d_main.c:49
static BOOL wined3d_dll_destroy(HINSTANCE hInstDLL)
Definition: wined3d_main.c:334
BOOL wined3d_register_window(HWND window, struct wined3d_device *device)
Definition: wined3d_main.c:432
static CRITICAL_SECTION wined3d_wndproc_cs
Definition: wined3d_main.c:61
static void wined3d_wndproc_mutex_lock(void)
Definition: wined3d_main.c:378
static CRITICAL_SECTION wined3d_cs
Definition: wined3d_main.c:51
static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
Definition: wined3d_main.c:147
static void wined3d_wndproc_mutex_unlock(void)
Definition: wined3d_main.c:383
void wined3d_unregister_window(HWND window)
Definition: wined3d_main.c:470
static DWORD get_config_key(HKEY defkey, HKEY appkey, const char *name, char *buffer, DWORD size)
Definition: wined3d_main.c:124
#define WINED3D_OPENGL_WINDOW_CLASS_NAME
#define PCI_VENDOR_NONE
#define MAKEDWORD_VERSION(maj, min)
#define PCI_DEVICE_NONE
#define ORM_BACKBUFFER
#define ORM_FBO
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define CS_VREDRAW
Definition: winuser.h:653
#define SetWindowLongPtrA
Definition: winuser.h:5335
#define GetWindowLongPtrW
Definition: winuser.h:4819
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CS_HREDRAW
Definition: winuser.h:648
#define IDC_ARROW
Definition: winuser.h:682
#define GetWindowLongPtrA
Definition: winuser.h:4818
#define IDI_WINLOGO
Definition: winuser.h:704
BOOL WINAPI IsWindowUnicode(_In_ HWND)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
HICON WINAPI LoadIconA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2029
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2896
#define SetWindowLongPtrW
Definition: winuser.h:5336
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2059
unsigned char BYTE
Definition: xxhash.c:193