dnsapi: Cast-qual warnings fix.
[wine] / dlls / d3d9 / d3d9_main.c
1 /*
2  * Direct3D 9
3  *
4  * Copyright 2002-2003 Jason Edmeades
5  * Copyright 2002-2003 Raphael Junqueira
6  * Copyright 2005 Oliver Stieber
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21  *
22  */
23
24 #include "config.h"
25 #include "initguid.h"
26 #include "d3d9_private.h"
27
28 WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
29
30 static int D3DPERF_event_level = 0;
31
32 void (*wine_tsx11_lock_ptr)(void) = NULL;
33 void (*wine_tsx11_unlock_ptr)(void) = NULL;
34
35
36 HRESULT WINAPI D3D9GetSWInfo(void) {
37     FIXME("(void): stub\n");
38     return 0;
39 }
40
41 void WINAPI DebugSetMute(void) {
42     /* nothing to do */
43 }
44
45 IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion) {
46     IDirect3D9Impl* object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D9Impl));
47
48     object->lpVtbl = &Direct3D9_Vtbl;
49     object->ref = 1;
50     object->WineD3D = WineDirect3DCreate(SDKVersion, 9, (IUnknown *)object);
51
52     TRACE("SDKVersion = %x, Created Direct3D object @ %p, WineObj @ %p\n", SDKVersion, object, object->WineD3D);
53
54     return (IDirect3D9*) object;
55 }
56
57 /* At process attach */
58 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) {
59     TRACE("fdwReason=%ld\n", fdwReason);
60     if (fdwReason == DLL_PROCESS_ATTACH) {
61         HMODULE mod;
62
63         DisableThreadLibraryCalls(hInstDLL);
64
65         mod = GetModuleHandleA( "winex11.drv" );
66         if (mod)
67         {
68             wine_tsx11_lock_ptr   = (void*) GetProcAddress(mod, "wine_tsx11_lock");
69             wine_tsx11_unlock_ptr = (void*) GetProcAddress(mod, "wine_tsx11_unlock");
70         }
71     }
72     return TRUE;
73 }
74
75 /***********************************************************************
76  *              D3DPERF_BeginEvent (D3D9.@)
77  */
78 int WINAPI D3DPERF_BeginEvent(D3DCOLOR color, LPCWSTR name) {
79     FIXME("(color %#lx, name %s) : stub\n", color, debugstr_w(name));
80
81     return D3DPERF_event_level++;
82 }
83
84 /***********************************************************************
85  *              D3DPERF_EndEvent (D3D9.@)
86  */
87 int WINAPI D3DPERF_EndEvent(void) {
88     FIXME("(void) : stub\n");
89
90     return --D3DPERF_event_level;
91 }
92
93 /***********************************************************************
94  *              D3DPERF_GetStatus (D3D9.@)
95  */
96 DWORD WINAPI D3DPERF_GetStatus(void) {
97     FIXME("(void) : stub\n");
98
99     return 0;
100 }
101
102 /***********************************************************************
103  *              D3DPERF_SetOptions (D3D9.@)
104  *
105  */
106 void WINAPI D3DPERF_SetOptions(DWORD options)
107 {
108   FIXME("(%#lx) : stub\n", options);
109 }
110
111 /***********************************************************************
112  *              D3DPERF_QueryRepeatFrame (D3D9.@)
113  */
114 BOOL WINAPI D3DPERF_QueryRepeatFrame(void) {
115     FIXME("(void) : stub\n");
116
117     return FALSE;
118 }
119
120 /***********************************************************************
121  *              D3DPERF_SetMarker (D3D9.@)
122  */
123 void WINAPI D3DPERF_SetMarker(D3DCOLOR color, LPCWSTR name) {
124     FIXME("(color %#lx, name %s) : stub\n", color, debugstr_w(name));
125 }
126
127 /***********************************************************************
128  *              D3DPERF_SetRegion (D3D9.@)
129  */
130 void WINAPI D3DPERF_SetRegion(D3DCOLOR color, LPCWSTR name) {
131     FIXME("(color %#lx, name %s) : stub\n", color, debugstr_w(name));
132 }