d3d: Remove AddRef from IWineD3DDevice_GetDepthStencilSurface.
[wine.git] / dlls / d3d9 / d3d9_main.c
bloba5e1cef0dc770a3001f188c399be1b37b1bce2aa
1 /*
2 * Direct3D 9
4 * Copyright 2002-2003 Jason Edmeades
5 * Copyright 2002-2003 Raphael Junqueira
6 * Copyright 2005 Oliver Stieber
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.
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.
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
24 #include "config.h"
25 #include "initguid.h"
26 #include "d3d9_private.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
30 static int D3DPERF_event_level = 0;
32 HRESULT WINAPI D3D9GetSWInfo(void) {
33 FIXME("(void): stub\n");
34 return 0;
37 void WINAPI DebugSetMute(void) {
38 /* nothing to do */
41 IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion) {
42 IDirect3D9Impl* object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D9Impl));
44 object->lpVtbl = &Direct3D9_Vtbl;
45 object->ref = 1;
46 object->WineD3D = WineDirect3DCreate(SDKVersion, 9, (IUnknown *)object);
48 TRACE("SDKVersion = %x, Created Direct3D object @ %p, WineObj @ %p\n", SDKVersion, object, object->WineD3D);
50 return (IDirect3D9*) object;
53 /* At process attach */
54 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
56 TRACE("fdwReason=%d\n", fdwReason);
57 if (fdwReason == DLL_PROCESS_ATTACH)
58 DisableThreadLibraryCalls(hInstDLL);
60 return TRUE;
63 /***********************************************************************
64 * D3DPERF_BeginEvent (D3D9.@)
66 int WINAPI D3DPERF_BeginEvent(D3DCOLOR color, LPCWSTR name) {
67 FIXME("(color %#x, name %s) : stub\n", color, debugstr_w(name));
69 return D3DPERF_event_level++;
72 /***********************************************************************
73 * D3DPERF_EndEvent (D3D9.@)
75 int WINAPI D3DPERF_EndEvent(void) {
76 FIXME("(void) : stub\n");
78 return --D3DPERF_event_level;
81 /***********************************************************************
82 * D3DPERF_GetStatus (D3D9.@)
84 DWORD WINAPI D3DPERF_GetStatus(void) {
85 FIXME("(void) : stub\n");
87 return 0;
90 /***********************************************************************
91 * D3DPERF_SetOptions (D3D9.@)
94 void WINAPI D3DPERF_SetOptions(DWORD options)
96 FIXME("(%#x) : stub\n", options);
99 /***********************************************************************
100 * D3DPERF_QueryRepeatFrame (D3D9.@)
102 BOOL WINAPI D3DPERF_QueryRepeatFrame(void) {
103 FIXME("(void) : stub\n");
105 return FALSE;
108 /***********************************************************************
109 * D3DPERF_SetMarker (D3D9.@)
111 void WINAPI D3DPERF_SetMarker(D3DCOLOR color, LPCWSTR name) {
112 FIXME("(color %#x, name %s) : stub\n", color, debugstr_w(name));
115 /***********************************************************************
116 * D3DPERF_SetRegion (D3D9.@)
118 void WINAPI D3DPERF_SetRegion(D3DCOLOR color, LPCWSTR name) {
119 FIXME("(color %#x, name %s) : stub\n", color, debugstr_w(name));