ReactOS 0.4.16-dev-338-g34e76ad
device.c
Go to the documentation of this file.
1/*
2 * Implementation of IDirect3DRMDevice Interface
3 *
4 * Copyright 2011, 2012 André Hentschel
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include "d3drm_private.h"
22
24
25static inline struct d3drm_device *impl_from_IDirect3DRMDevice(IDirect3DRMDevice *iface)
26{
28}
29
30static inline struct d3drm_device *impl_from_IDirect3DRMDevice2(IDirect3DRMDevice2 *iface)
31{
33}
34
35static inline struct d3drm_device *impl_from_IDirect3DRMDevice3(IDirect3DRMDevice3 *iface)
36{
38}
39
41{
42 d3drm_object_cleanup((IDirect3DRMObject *)&device->IDirect3DRMDevice_iface, &device->obj);
43 if (device->device)
44 {
45 TRACE("Releasing attached ddraw interfaces.\n");
47 }
48 if (device->render_target)
49 IDirectDrawSurface_Release(device->render_target);
50 if (device->primary_surface)
51 {
52 TRACE("Releasing primary surface and attached clipper.\n");
53 IDirectDrawSurface_Release(device->primary_surface);
54 IDirectDrawClipper_Release(device->clipper);
55 }
56 if (device->ddraw)
57 {
58 IDirectDraw_Release(device->ddraw);
60 }
62}
63
64static inline struct d3drm_device *impl_from_IDirect3DRMWinDevice(IDirect3DRMWinDevice *iface)
65{
67}
68
69HRESULT d3drm_device_create_surfaces_from_clipper(struct d3drm_device *object, IDirectDraw *ddraw, IDirectDrawClipper *clipper, int width, int height, IDirectDrawSurface **surface)
70{
71 DDSURFACEDESC surface_desc;
72 IDirectDrawSurface *primary_surface, *render_target;
74 HRESULT hr;
75
76 hr = IDirectDrawClipper_GetHWnd(clipper, &window);
77 if (FAILED(hr))
78 return hr;
79
80 hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL);
81 if (FAILED(hr))
82 return hr;
83
84 memset(&surface_desc, 0, sizeof(surface_desc));
85 surface_desc.dwSize = sizeof(surface_desc);
86 surface_desc.dwFlags = DDSD_CAPS;
87 surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
88 hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &primary_surface, NULL);
89 if (FAILED(hr))
90 return hr;
91 hr = IDirectDrawSurface_SetClipper(primary_surface, clipper);
92 if (FAILED(hr))
93 {
94 IDirectDrawSurface_Release(primary_surface);
95 return hr;
96 }
97
98 memset(&surface_desc, 0, sizeof(surface_desc));
99 surface_desc.dwSize = sizeof(surface_desc);
100 surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
101 surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE;
102 surface_desc.dwWidth = width;
103 surface_desc.dwHeight = height;
104
105 hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &render_target, NULL);
106 if (FAILED(hr))
107 {
108 IDirectDrawSurface_Release(primary_surface);
109 return hr;
110 }
111
112 object->primary_surface = primary_surface;
113 object->clipper = clipper;
114 IDirectDrawClipper_AddRef(clipper);
115 *surface = render_target;
116
117 return D3DRM_OK;
118}
119
120HRESULT d3drm_device_init(struct d3drm_device *device, UINT version, IDirectDraw *ddraw, IDirectDrawSurface *surface,
121 BOOL create_z_surface)
122{
123 DDSCAPS caps = { DDSCAPS_ZBUFFER };
124 IDirectDrawSurface *ds = NULL;
125 IDirect3DDevice *device1 = NULL;
126 IDirect3DDevice2 *device2 = NULL;
127 IDirect3D2 *d3d2 = NULL;
128 DDSURFACEDESC desc, surface_desc;
129 HRESULT hr;
130
131 device->ddraw = ddraw;
132 IDirectDraw_AddRef(ddraw);
134 device->render_target = surface;
135 IDirectDrawSurface_AddRef(surface);
136
137 desc.dwSize = sizeof(desc);
138 hr = IDirectDrawSurface_GetSurfaceDesc(surface, &desc);
139 if (FAILED(hr))
140 return hr;
141
142 if (!(desc.ddsCaps.dwCaps & DDSCAPS_3DDEVICE))
143 return DDERR_INVALIDCAPS;
144
145 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &ds);
146 if (SUCCEEDED(hr))
147 {
148 create_z_surface = FALSE;
149 IDirectDrawSurface_Release(ds);
150 ds = NULL;
151 }
152
153 if (create_z_surface)
154 {
155 memset(&surface_desc, 0, sizeof(surface_desc));
156 surface_desc.dwSize = sizeof(surface_desc);
157 surface_desc.dwFlags = DDSD_CAPS | DDSD_ZBUFFERBITDEPTH | DDSD_WIDTH | DDSD_HEIGHT;
158 surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER;
159 surface_desc.u2.dwZBufferBitDepth = 16;
160 surface_desc.dwWidth = desc.dwWidth;
161 surface_desc.dwHeight = desc.dwHeight;
162 hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &ds, NULL);
163 if (FAILED(hr))
164 return hr;
165
166 hr = IDirectDrawSurface_AddAttachedSurface(surface, ds);
167 IDirectDrawSurface_Release(ds);
168 if (FAILED(hr))
169 return hr;
170 }
171
172 if (version == 1)
173 hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DRGBDevice, (void **)&device1);
174 else
175 {
176 IDirectDraw_QueryInterface(ddraw, &IID_IDirect3D2, (void**)&d3d2);
177 hr = IDirect3D2_CreateDevice(d3d2, &IID_IDirect3DRGBDevice, surface, &device2);
178 IDirect3D2_Release(d3d2);
179 }
180 if (FAILED(hr))
181 {
182 IDirectDrawSurface_DeleteAttachedSurface(surface, 0, ds);
183 return hr;
184 }
185
186 if (version != 1)
187 {
188 hr = IDirect3DDevice2_QueryInterface(device2, &IID_IDirect3DDevice, (void**)&device1);
190 if (FAILED(hr))
191 {
192 IDirectDrawSurface_DeleteAttachedSurface(surface, 0, ds);
193 return hr;
194 }
195 }
196 device->device = device1;
197 device->width = desc.dwWidth;
198 device->height = desc.dwHeight;
199
200 return hr;
201}
202
203static HRESULT d3drm_device_set_ddraw_device_d3d(struct d3drm_device *device, IDirect3D *d3d, IDirect3DDevice *d3d_device)
204{
205 IDirectDraw *ddraw;
206 IDirectDrawSurface *surface;
207 IDirect3DDevice2 *d3d_device2 = NULL;
209 HRESULT hr;
210
211 /* AddRef these interfaces beforehand for the intentional leak on reinitialization. */
212 if (FAILED(hr = IDirect3D_QueryInterface(d3d, &IID_IDirectDraw, (void **)&ddraw)))
213 return hr;
216
217 /* Fetch render target and get width/height from there */
218 if (FAILED(hr = IDirect3DDevice_QueryInterface(d3d_device, &IID_IDirectDrawSurface, (void **)&surface)))
219 {
220 if (FAILED(hr = IDirect3DDevice_QueryInterface(d3d_device, &IID_IDirect3DDevice2, (void **)&d3d_device2)))
221 return hr;
222 hr = IDirect3DDevice2_GetRenderTarget(d3d_device2, &surface);
223 IDirect3DDevice2_Release(d3d_device2);
224 if (FAILED(hr))
225 return hr;
226 }
227
228 if (device->ddraw)
229 {
230 if (d3d_device2)
231 IDirectDrawSurface_Release(surface);
232 return D3DRMERR_BADOBJECT;
233 }
234
235 desc.dwSize = sizeof(desc);
236 hr = IDirectDrawSurface_GetSurfaceDesc(surface, &desc);
237 if (FAILED(hr))
238 {
239 IDirectDrawSurface_Release(surface);
240 return hr;
241 }
242
243 device->ddraw = ddraw;
244 device->width = desc.dwWidth;
245 device->height = desc.dwHeight;
246 device->device = d3d_device;
247 device->render_target = surface;
248
249 return hr;
250}
251
252static HRESULT WINAPI d3drm_device3_QueryInterface(IDirect3DRMDevice3 *iface, REFIID riid, void **out)
253{
255
256 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
257
258 if (IsEqualGUID(riid, &IID_IDirect3DRMDevice)
259 || IsEqualGUID(riid, &IID_IDirect3DRMObject)
261 {
262 *out = &device->IDirect3DRMDevice_iface;
263 }
264 else if (IsEqualGUID(riid, &IID_IDirect3DRMDevice2))
265 {
266 *out = &device->IDirect3DRMDevice2_iface;
267 }
268 else if (IsEqualGUID(riid, &IID_IDirect3DRMDevice3))
269 {
270 *out = &device->IDirect3DRMDevice3_iface;
271 }
272 else if (IsEqualGUID(riid, &IID_IDirect3DRMWinDevice))
273 {
274 *out = &device->IDirect3DRMWinDevice_iface;
275 }
276 else
277 {
278 *out = NULL;
279 WARN("%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(riid));
281 }
282
283 IUnknown_AddRef((IUnknown *)*out);
284 return S_OK;
285}
286
287static HRESULT WINAPI d3drm_device2_QueryInterface(IDirect3DRMDevice2 *iface, REFIID riid, void **out)
288{
290
291 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
292
293 return d3drm_device3_QueryInterface(&device->IDirect3DRMDevice3_iface, riid, out);
294}
295
296static HRESULT WINAPI d3drm_device1_QueryInterface(IDirect3DRMDevice *iface, REFIID riid, void **out)
297{
299
300 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
301
302 return d3drm_device3_QueryInterface(&device->IDirect3DRMDevice3_iface, riid, out);
303}
304
305static ULONG WINAPI d3drm_device3_AddRef(IDirect3DRMDevice3 *iface)
306{
308 ULONG refcount = InterlockedIncrement(&device->obj.ref);
309
310 TRACE("%p increasing refcount to %u.\n", iface, refcount);
311
312 return refcount;
313}
314
315static ULONG WINAPI d3drm_device2_AddRef(IDirect3DRMDevice2 *iface)
316{
318
319 TRACE("iface %p.\n", iface);
320
321 return d3drm_device3_AddRef(&device->IDirect3DRMDevice3_iface);
322}
323
324static ULONG WINAPI d3drm_device1_AddRef(IDirect3DRMDevice *iface)
325{
327
328 TRACE("iface %p.\n", iface);
329
330 return d3drm_device3_AddRef(&device->IDirect3DRMDevice3_iface);
331}
332
333static ULONG WINAPI d3drm_device3_Release(IDirect3DRMDevice3 *iface)
334{
336 ULONG refcount = InterlockedDecrement(&device->obj.ref);
337
338 TRACE("%p decreasing refcount to %u.\n", iface, refcount);
339
340 if (!refcount)
342
343 return refcount;
344}
345
346static ULONG WINAPI d3drm_device2_Release(IDirect3DRMDevice2 *iface)
347{
349
350 TRACE("iface %p.\n", iface);
351
352 return d3drm_device3_Release(&device->IDirect3DRMDevice3_iface);
353}
354
355static ULONG WINAPI d3drm_device1_Release(IDirect3DRMDevice *iface)
356{
358
359 TRACE("iface %p.\n", iface);
360
361 return d3drm_device3_Release(&device->IDirect3DRMDevice3_iface);
362}
363
364static HRESULT WINAPI d3drm_device3_Clone(IDirect3DRMDevice3 *iface,
365 IUnknown *outer, REFIID iid, void **out)
366{
367 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
368
369 return E_NOTIMPL;
370}
371
372static HRESULT WINAPI d3drm_device2_Clone(IDirect3DRMDevice2 *iface,
373 IUnknown *outer, REFIID iid, void **out)
374{
376
377 TRACE("iface %p, outer %p, iid %s, out %p\n", iface, outer, debugstr_guid(iid), out);
378
379 return d3drm_device3_Clone(&device->IDirect3DRMDevice3_iface, outer, iid, out);
380}
381
382static HRESULT WINAPI d3drm_device1_Clone(IDirect3DRMDevice *iface,
383 IUnknown *outer, REFIID iid, void **out)
384{
386
387 TRACE("iface %p, outer %p, iid %s, out %p.\n", iface, outer, debugstr_guid(iid), out);
388
389 return d3drm_device3_Clone(&device->IDirect3DRMDevice3_iface, outer, iid, out);
390}
391
392static HRESULT WINAPI d3drm_device3_AddDestroyCallback(IDirect3DRMDevice3 *iface,
394{
396
397 TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
398
400}
401
402static HRESULT WINAPI d3drm_device2_AddDestroyCallback(IDirect3DRMDevice2 *iface,
404{
406
407 TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
408
409 return d3drm_device3_AddDestroyCallback(&device->IDirect3DRMDevice3_iface, cb, ctx);
410}
411
412static HRESULT WINAPI d3drm_device1_AddDestroyCallback(IDirect3DRMDevice *iface,
414{
416
417 TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
418
419 return d3drm_device3_AddDestroyCallback(&device->IDirect3DRMDevice3_iface, cb, ctx);
420}
421
422static HRESULT WINAPI d3drm_device3_DeleteDestroyCallback(IDirect3DRMDevice3 *iface,
424{
426
427 TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
428
430}
431
432static HRESULT WINAPI d3drm_device2_DeleteDestroyCallback(IDirect3DRMDevice2 *iface,
434{
436
437 TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
438
439 return d3drm_device3_DeleteDestroyCallback(&device->IDirect3DRMDevice3_iface, cb, ctx);
440}
441
442static HRESULT WINAPI d3drm_device1_DeleteDestroyCallback(IDirect3DRMDevice *iface,
444{
446
447 TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
448
449 return d3drm_device3_DeleteDestroyCallback(&device->IDirect3DRMDevice3_iface, cb, ctx);
450}
451
452static HRESULT WINAPI d3drm_device3_SetAppData(IDirect3DRMDevice3 *iface, DWORD data)
453{
455
456 TRACE("iface %p, data %#x.\n", iface, data);
457
458 device->obj.appdata = data;
459
460 return D3DRM_OK;
461}
462
463static HRESULT WINAPI d3drm_device2_SetAppData(IDirect3DRMDevice2 *iface, DWORD data)
464{
466
467 TRACE("iface %p, data %#x.\n", iface, data);
468
469 return d3drm_device3_SetAppData(&device->IDirect3DRMDevice3_iface, data);
470}
471
472static HRESULT WINAPI d3drm_device1_SetAppData(IDirect3DRMDevice *iface, DWORD data)
473{
475
476 TRACE("iface %p, data %#x.\n", iface, data);
477
478 return d3drm_device3_SetAppData(&device->IDirect3DRMDevice3_iface, data);
479}
480
481static DWORD WINAPI d3drm_device3_GetAppData(IDirect3DRMDevice3 *iface)
482{
484
485 TRACE("iface %p.\n", iface);
486
487 return device->obj.appdata;
488}
489
490static DWORD WINAPI d3drm_device2_GetAppData(IDirect3DRMDevice2 *iface)
491{
493
494 TRACE("iface %p.\n", iface);
495
496 return d3drm_device3_GetAppData(&device->IDirect3DRMDevice3_iface);
497}
498
499static DWORD WINAPI d3drm_device1_GetAppData(IDirect3DRMDevice *iface)
500{
502
503 TRACE("iface %p.\n", iface);
504
505 return d3drm_device3_GetAppData(&device->IDirect3DRMDevice3_iface);
506}
507
508static HRESULT WINAPI d3drm_device3_SetName(IDirect3DRMDevice3 *iface, const char *name)
509{
511
512 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
513
514 return d3drm_object_set_name(&device->obj, name);
515}
516
517static HRESULT WINAPI d3drm_device2_SetName(IDirect3DRMDevice2 *iface, const char *name)
518{
520
521 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
522
523 return d3drm_device3_SetName(&device->IDirect3DRMDevice3_iface, name);
524}
525
526static HRESULT WINAPI d3drm_device1_SetName(IDirect3DRMDevice *iface, const char *name)
527{
529
530 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
531
532 return d3drm_device3_SetName(&device->IDirect3DRMDevice3_iface, name);
533}
534
535static HRESULT WINAPI d3drm_device3_GetName(IDirect3DRMDevice3 *iface, DWORD *size, char *name)
536{
538
539 TRACE("iface %p, size %p, name %p.\n", iface, size, name);
540
541 return d3drm_object_get_name(&device->obj, size, name);
542}
543
544static HRESULT WINAPI d3drm_device2_GetName(IDirect3DRMDevice2 *iface, DWORD *size, char *name)
545{
547
548 TRACE("iface %p, size %p, name %p.\n", iface, size, name);
549
550 return d3drm_device3_GetName(&device->IDirect3DRMDevice3_iface, size, name);
551}
552
553static HRESULT WINAPI d3drm_device1_GetName(IDirect3DRMDevice *iface, DWORD *size, char *name)
554{
556
557 TRACE("iface %p, size %p, name %p.\n", iface, size, name);
558
559 return d3drm_device3_GetName(&device->IDirect3DRMDevice3_iface, size, name);
560}
561
562static HRESULT WINAPI d3drm_device3_GetClassName(IDirect3DRMDevice3 *iface, DWORD *size, char *name)
563{
565
566 TRACE("iface %p, size %p, name %p.\n", iface, size, name);
567
569}
570
571static HRESULT WINAPI d3drm_device2_GetClassName(IDirect3DRMDevice2 *iface, DWORD *size, char *name)
572{
574
575 TRACE("iface %p, size %p, name %p.\n", iface, size, name);
576
577 return d3drm_device3_GetClassName(&device->IDirect3DRMDevice3_iface, size, name);
578}
579
580static HRESULT WINAPI d3drm_device1_GetClassName(IDirect3DRMDevice *iface, DWORD *size, char *name)
581{
583
584 TRACE("iface %p, size %p, name %p.\n", iface, size, name);
585
586 return d3drm_device3_GetClassName(&device->IDirect3DRMDevice3_iface, size, name);
587}
588
589static HRESULT WINAPI d3drm_device3_Init(IDirect3DRMDevice3 *iface, ULONG width, ULONG height)
590{
592
593 FIXME("iface %p, width %u, height %u stub!\n", iface, width, height);
594
595 device->height = height;
596 device->width = width;
597
598 return D3DRM_OK;
599}
600
601static HRESULT WINAPI d3drm_device2_Init(IDirect3DRMDevice2 *iface, ULONG width, ULONG height)
602{
604
605 TRACE("iface %p, width %u, height %u.\n", iface, width, height);
606
607 return d3drm_device3_Init(&device->IDirect3DRMDevice3_iface, width, height);
608}
609
610static HRESULT WINAPI d3drm_device1_Init(IDirect3DRMDevice *iface, ULONG width, ULONG height)
611{
613
614 TRACE("iface %p, width %u, height %u.\n", iface, width, height);
615
616 return d3drm_device3_Init(&device->IDirect3DRMDevice3_iface, width, height);
617}
618
619static HRESULT WINAPI d3drm_device3_InitFromD3D(IDirect3DRMDevice3 *iface,
620 IDirect3D *d3d, IDirect3DDevice *d3d_device)
621{
622 FIXME("iface %p, d3d %p, d3d_device %p stub!\n", iface, d3d, d3d_device);
623
624 if (!d3d || !d3d_device)
625 return D3DRMERR_BADVALUE;
626
627 return E_NOINTERFACE;
628}
629
630static HRESULT WINAPI d3drm_device2_InitFromD3D(IDirect3DRMDevice2 *iface,
631 IDirect3D *d3d, IDirect3DDevice *d3d_device)
632{
634
635 TRACE("iface %p, d3d %p, d3d_device %p.\n", iface, d3d, d3d_device);
636
637 return d3drm_device3_InitFromD3D(&device->IDirect3DRMDevice3_iface, d3d, d3d_device);
638}
639
640static HRESULT WINAPI d3drm_device1_InitFromD3D(IDirect3DRMDevice *iface,
641 IDirect3D *d3d, IDirect3DDevice *d3d_device)
642{
644
645 TRACE("iface %p, d3d %p, d3d_device %p.\n", iface, d3d, d3d_device);
646
647 if (!d3d || !d3d_device)
648 return D3DRMERR_BADVALUE;
649
651}
652
653static HRESULT WINAPI d3drm_device3_InitFromClipper(IDirect3DRMDevice3 *iface,
654 IDirectDrawClipper *clipper, GUID *guid, int width, int height)
655{
657
658 FIXME("iface %p, clipper %p, guid %s, width %d, height %d stub!\n",
660
661 device->height = height;
662 device->width = width;
663
664 return D3DRM_OK;
665}
666
667static HRESULT WINAPI d3drm_device2_InitFromClipper(IDirect3DRMDevice2 *iface,
668 IDirectDrawClipper *clipper, GUID *guid, int width, int height)
669{
671
672 TRACE("iface %p, clipper %p, guid %s, width %d, height %d.\n",
674
675 return d3drm_device3_InitFromClipper(&device->IDirect3DRMDevice3_iface,
677}
678
679static HRESULT WINAPI d3drm_device1_InitFromClipper(IDirect3DRMDevice *iface,
680 IDirectDrawClipper *clipper, GUID *guid, int width, int height)
681{
683
684 TRACE("iface %p, clipper %p, guid %s, width %d, height %d.\n",
686
687 return d3drm_device3_InitFromClipper(&device->IDirect3DRMDevice3_iface,
689}
690
691static HRESULT WINAPI d3drm_device3_Update(IDirect3DRMDevice3 *iface)
692{
693 FIXME("iface %p stub!\n", iface);
694
695 return D3DRM_OK;
696}
697
698static HRESULT WINAPI d3drm_device2_Update(IDirect3DRMDevice2 *iface)
699{
700 FIXME("iface %p stub!\n", iface);
701
702 return D3DRM_OK;
703}
704
705static HRESULT WINAPI d3drm_device1_Update(IDirect3DRMDevice *iface)
706{
707 FIXME("iface %p stub!\n", iface);
708
709 return D3DRM_OK;
710}
711
712static HRESULT WINAPI d3drm_device3_AddUpdateCallback(IDirect3DRMDevice3 *iface,
714{
715 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
716
717 return E_NOTIMPL;
718}
719
720static HRESULT WINAPI d3drm_device2_AddUpdateCallback(IDirect3DRMDevice2 *iface,
722{
723 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
724
725 return E_NOTIMPL;
726}
727
728static HRESULT WINAPI d3drm_device1_AddUpdateCallback(IDirect3DRMDevice *iface,
730{
731 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
732
733 return E_NOTIMPL;
734}
735
736static HRESULT WINAPI d3drm_device3_DeleteUpdateCallback(IDirect3DRMDevice3 *iface,
738{
739 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
740
741 return E_NOTIMPL;
742}
743
744static HRESULT WINAPI d3drm_device2_DeleteUpdateCallback(IDirect3DRMDevice2 *iface,
746{
747 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
748
749 return E_NOTIMPL;
750}
751
752static HRESULT WINAPI d3drm_device1_DeleteUpdateCallback(IDirect3DRMDevice *iface,
754{
755 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
756
757 return E_NOTIMPL;
758}
759
760static HRESULT WINAPI d3drm_device3_SetBufferCount(IDirect3DRMDevice3 *iface, DWORD count)
761{
762 FIXME("iface %p, count %u stub!\n", iface, count);
763
764 return E_NOTIMPL;
765}
766
767static HRESULT WINAPI d3drm_device2_SetBufferCount(IDirect3DRMDevice2 *iface, DWORD count)
768{
770
771 TRACE("iface %p, count %u.\n", iface, count);
772
773 return d3drm_device3_SetBufferCount(&device->IDirect3DRMDevice3_iface, count);
774}
775
776static HRESULT WINAPI d3drm_device1_SetBufferCount(IDirect3DRMDevice *iface, DWORD count)
777{
779
780 TRACE("iface %p, count %u.\n", iface, count);
781
782 return d3drm_device3_SetBufferCount(&device->IDirect3DRMDevice3_iface, count);
783}
784
785static DWORD WINAPI d3drm_device3_GetBufferCount(IDirect3DRMDevice3 *iface)
786{
787 FIXME("iface %p stub!\n", iface);
788
789 return E_NOTIMPL;
790}
791
792static DWORD WINAPI d3drm_device2_GetBufferCount(IDirect3DRMDevice2 *iface)
793{
795
796 TRACE("iface %p.\n", iface);
797
798 return d3drm_device3_GetBufferCount(&device->IDirect3DRMDevice3_iface);
799}
800
801static DWORD WINAPI d3drm_device1_GetBufferCount(IDirect3DRMDevice *iface)
802{
804
805 TRACE("iface %p.\n", iface);
806
807 return d3drm_device3_GetBufferCount(&device->IDirect3DRMDevice3_iface);
808}
809
810static HRESULT WINAPI d3drm_device3_SetDither(IDirect3DRMDevice3 *iface, BOOL enable)
811{
813
814 TRACE("iface %p, enable %#x.\n", iface, enable);
815
816 device->dither = enable;
817
818 return D3DRM_OK;
819}
820
821static HRESULT WINAPI d3drm_device2_SetDither(IDirect3DRMDevice2 *iface, BOOL enable)
822{
824
825 TRACE("iface %p, enabled %#x.\n", iface, enable);
826
827 return d3drm_device3_SetDither(&device->IDirect3DRMDevice3_iface, enable);
828}
829
830static HRESULT WINAPI d3drm_device1_SetDither(IDirect3DRMDevice *iface, BOOL enable)
831{
833
834 TRACE("iface %p, enabled %#x.\n", iface, enable);
835
836 return d3drm_device3_SetDither(&device->IDirect3DRMDevice3_iface, enable);
837}
838
839static HRESULT WINAPI d3drm_device3_SetShades(IDirect3DRMDevice3 *iface, DWORD count)
840{
841 FIXME("iface %p, count %u stub!\n", iface, count);
842
843 return E_NOTIMPL;
844}
845
846static HRESULT WINAPI d3drm_device2_SetShades(IDirect3DRMDevice2 *iface, DWORD count)
847{
849
850 TRACE("iface %p, count %u.\n", iface, count);
851
852 return d3drm_device3_SetShades(&device->IDirect3DRMDevice3_iface, count);
853}
854
855static HRESULT WINAPI d3drm_device1_SetShades(IDirect3DRMDevice *iface, DWORD count)
856{
858
859 TRACE("iface %p, count %u.\n", iface, count);
860
861 return d3drm_device3_SetShades(&device->IDirect3DRMDevice3_iface, count);
862}
863
865{
867
868 TRACE("iface %p, quality %u.\n", iface, quality);
869
870 device->quality = quality;
871
872 return D3DRM_OK;
873}
874
876{
878
879 TRACE("iface %p, quality %u.\n", iface, quality);
880
881 return d3drm_device3_SetQuality(&device->IDirect3DRMDevice3_iface, quality);
882}
883
885{
887
888 TRACE("iface %p, quality %u.\n", iface, quality);
889
890 return d3drm_device3_SetQuality(&device->IDirect3DRMDevice3_iface, quality);
891}
892
894{
895 FIXME("iface %p, quality %u stub!\n", iface, quality);
896
897 return E_NOTIMPL;
898}
899
901{
903
904 TRACE("iface %p, quality %u.\n", iface, quality);
905
906 return d3drm_device3_SetTextureQuality(&device->IDirect3DRMDevice3_iface, quality);
907}
908
910{
912
913 TRACE("iface %p, quality %u.\n", iface, quality);
914
915 return d3drm_device3_SetTextureQuality(&device->IDirect3DRMDevice3_iface, quality);
916}
917
918static HRESULT WINAPI d3drm_device3_GetViewports(IDirect3DRMDevice3 *iface, IDirect3DRMViewportArray **array)
919{
920 FIXME("iface %p, array %p stub!\n", iface, array);
921
922 return E_NOTIMPL;
923}
924
925static HRESULT WINAPI d3drm_device2_GetViewports(IDirect3DRMDevice2 *iface, IDirect3DRMViewportArray **array)
926{
928
929 TRACE("iface %p, array %p.\n", iface, array);
930
931 return d3drm_device3_GetViewports(&device->IDirect3DRMDevice3_iface, array);
932}
933
934static HRESULT WINAPI d3drm_device1_GetViewports(IDirect3DRMDevice *iface, IDirect3DRMViewportArray **array)
935{
937
938 TRACE("iface %p, array %p.\n", iface, array);
939
940 return d3drm_device3_GetViewports(&device->IDirect3DRMDevice3_iface, array);
941}
942
943static BOOL WINAPI d3drm_device3_GetDither(IDirect3DRMDevice3 *iface)
944{
946
947 TRACE("iface %p.\n", iface);
948
949 return device->dither;
950}
951
952static BOOL WINAPI d3drm_device2_GetDither(IDirect3DRMDevice2 *iface)
953{
955
956 TRACE("iface %p.\n", iface);
957
958 return d3drm_device3_GetDither(&device->IDirect3DRMDevice3_iface);
959}
960
961static BOOL WINAPI d3drm_device1_GetDither(IDirect3DRMDevice *iface)
962{
964
965 TRACE("iface %p.\n", iface);
966
967 return d3drm_device3_GetDither(&device->IDirect3DRMDevice3_iface);
968}
969
970static DWORD WINAPI d3drm_device3_GetShades(IDirect3DRMDevice3 *iface)
971{
972 FIXME("iface %p stub!\n", iface);
973
974 return E_NOTIMPL;
975}
976
977static DWORD WINAPI d3drm_device2_GetShades(IDirect3DRMDevice2 *iface)
978{
980
981 TRACE("iface %p.\n", iface);
982
983 return d3drm_device3_GetShades(&device->IDirect3DRMDevice3_iface);
984}
985
986static DWORD WINAPI d3drm_device1_GetShades(IDirect3DRMDevice *iface)
987{
989
990 TRACE("iface %p.\n", iface);
991
992 return d3drm_device3_GetShades(&device->IDirect3DRMDevice3_iface);
993}
994
995static DWORD WINAPI d3drm_device3_GetHeight(IDirect3DRMDevice3 *iface)
996{
998
999 TRACE("iface %p.\n", iface);
1000
1001 return device->height;
1002}
1003
1004static DWORD WINAPI d3drm_device2_GetHeight(IDirect3DRMDevice2 *iface)
1005{
1007
1008 TRACE("iface %p.\n", iface);
1009
1010 return d3drm_device3_GetHeight(&device->IDirect3DRMDevice3_iface);
1011}
1012
1013static DWORD WINAPI d3drm_device1_GetHeight(IDirect3DRMDevice *iface)
1014{
1016
1017 TRACE("iface %p.\n", iface);
1018
1019 return d3drm_device3_GetHeight(&device->IDirect3DRMDevice3_iface);
1020}
1021
1022static DWORD WINAPI d3drm_device3_GetWidth(IDirect3DRMDevice3 *iface)
1023{
1025
1026 TRACE("iface %p.\n", iface);
1027
1028 return device->width;
1029}
1030
1031static DWORD WINAPI d3drm_device2_GetWidth(IDirect3DRMDevice2 *iface)
1032{
1034
1035 TRACE("iface %p.\n", iface);
1036
1037 return d3drm_device3_GetWidth(&device->IDirect3DRMDevice3_iface);
1038}
1039
1040static DWORD WINAPI d3drm_device1_GetWidth(IDirect3DRMDevice *iface)
1041{
1043
1044 TRACE("iface %p.\n", iface);
1045
1046 return d3drm_device3_GetWidth(&device->IDirect3DRMDevice3_iface);
1047}
1048
1049static DWORD WINAPI d3drm_device3_GetTrianglesDrawn(IDirect3DRMDevice3 *iface)
1050{
1051 FIXME("iface %p stub!\n", iface);
1052
1053 return E_NOTIMPL;
1054}
1055
1056static DWORD WINAPI d3drm_device2_GetTrianglesDrawn(IDirect3DRMDevice2 *iface)
1057{
1059
1060 TRACE("iface %p.\n", iface);
1061
1062 return d3drm_device3_GetTrianglesDrawn(&device->IDirect3DRMDevice3_iface);
1063}
1064
1065static DWORD WINAPI d3drm_device1_GetTrianglesDrawn(IDirect3DRMDevice *iface)
1066{
1068
1069 TRACE("iface %p.\n", iface);
1070
1071 return d3drm_device3_GetTrianglesDrawn(&device->IDirect3DRMDevice3_iface);
1072}
1073
1074static DWORD WINAPI d3drm_device3_GetWireframeOptions(IDirect3DRMDevice3 *iface)
1075{
1076 FIXME("iface %p stub!\n", iface);
1077
1078 return E_NOTIMPL;
1079}
1080
1081static DWORD WINAPI d3drm_device2_GetWireframeOptions(IDirect3DRMDevice2 *iface)
1082{
1084
1085 TRACE("iface %p.\n", iface);
1086
1087 return d3drm_device3_GetWireframeOptions(&device->IDirect3DRMDevice3_iface);
1088}
1089
1090static DWORD WINAPI d3drm_device1_GetWireframeOptions(IDirect3DRMDevice *iface)
1091{
1093
1094 TRACE("iface %p.\n", iface);
1095
1096 return d3drm_device3_GetWireframeOptions(&device->IDirect3DRMDevice3_iface);
1097}
1098
1099static D3DRMRENDERQUALITY WINAPI d3drm_device3_GetQuality(IDirect3DRMDevice3 *iface)
1100{
1102
1103 TRACE("iface %p.\n", iface);
1104
1105 return device->quality;
1106}
1107
1108static D3DRMRENDERQUALITY WINAPI d3drm_device2_GetQuality(IDirect3DRMDevice2 *iface)
1109{
1111
1112 TRACE("iface %p.\n", iface);
1113
1114 return d3drm_device3_GetQuality(&device->IDirect3DRMDevice3_iface);
1115}
1116
1118{
1120
1121 TRACE("iface %p.\n", iface);
1122
1123 return d3drm_device3_GetQuality(&device->IDirect3DRMDevice3_iface);
1124}
1125
1126static D3DCOLORMODEL WINAPI d3drm_device3_GetColorModel(IDirect3DRMDevice3 *iface)
1127{
1128 FIXME("iface %p stub!\n", iface);
1129
1130 return E_NOTIMPL;
1131}
1132
1133static D3DCOLORMODEL WINAPI d3drm_device2_GetColorModel(IDirect3DRMDevice2 *iface)
1134{
1136
1137 TRACE("iface %p.\n", iface);
1138
1139 return d3drm_device3_GetColorModel(&device->IDirect3DRMDevice3_iface);
1140}
1141
1142static D3DCOLORMODEL WINAPI d3drm_device1_GetColorModel(IDirect3DRMDevice *iface)
1143{
1145
1146 TRACE("iface %p.\n", iface);
1147
1148 return d3drm_device3_GetColorModel(&device->IDirect3DRMDevice3_iface);
1149}
1150
1152{
1153 FIXME("iface %p stub!\n", iface);
1154
1155 return E_NOTIMPL;
1156}
1157
1159{
1161
1162 TRACE("iface %p.\n", iface);
1163
1164 return d3drm_device3_GetTextureQuality(&device->IDirect3DRMDevice3_iface);
1165}
1166
1168{
1170
1171 TRACE("iface %p.\n", iface);
1172
1173 return d3drm_device3_GetTextureQuality(&device->IDirect3DRMDevice3_iface);
1174}
1175
1176static HRESULT WINAPI d3drm_device3_GetDirect3DDevice(IDirect3DRMDevice3 *iface, IDirect3DDevice **d3d_device)
1177{
1179 TRACE("iface %p, d3d_device %p!\n", iface, d3d_device);
1180
1181 *d3d_device = device->device;
1183
1184 return D3DRM_OK;
1185}
1186
1187static HRESULT WINAPI d3drm_device2_GetDirect3DDevice(IDirect3DRMDevice2 *iface, IDirect3DDevice **d3d_device)
1188{
1190
1191 TRACE("iface %p, d3d_device %p.\n", iface, d3d_device);
1192
1193 return d3drm_device3_GetDirect3DDevice(&device->IDirect3DRMDevice3_iface, d3d_device);
1194}
1195
1196static HRESULT WINAPI d3drm_device1_GetDirect3DDevice(IDirect3DRMDevice *iface, IDirect3DDevice **d3d_device)
1197{
1199
1200 TRACE("iface %p, d3d_device %p.\n", iface, d3d_device);
1201
1202 return d3drm_device3_GetDirect3DDevice(&device->IDirect3DRMDevice3_iface, d3d_device);
1203}
1204
1205static HRESULT WINAPI d3drm_device3_InitFromD3D2(IDirect3DRMDevice3 *iface,
1206 IDirect3D2 *d3d, IDirect3DDevice2 *d3d_device)
1207{
1209 IDirect3D *d3d1;
1210 IDirect3DDevice *d3d_device1;
1211 HRESULT hr;
1212
1213 TRACE("iface %p, d3d %p, d3d_device %p.\n", iface, d3d, d3d_device);
1214
1215 if (!d3d || !d3d_device)
1216 return D3DRMERR_BADVALUE;
1217
1218 if (FAILED(hr = IDirect3D2_QueryInterface(d3d, &IID_IDirect3D, (void **)&d3d1)))
1219 return hr;
1220 if (FAILED(hr = IDirect3DDevice2_QueryInterface(d3d_device, &IID_IDirect3DDevice, (void **)&d3d_device1)))
1221 {
1222 IDirect3D_Release(d3d1);
1223 return hr;
1224 }
1225
1226 hr = d3drm_device_set_ddraw_device_d3d(device, d3d1, d3d_device1);
1227 IDirect3D_Release(d3d1);
1228 IDirect3DDevice_Release(d3d_device1);
1229
1230 return hr;
1231}
1232
1233static HRESULT WINAPI d3drm_device2_InitFromD3D2(IDirect3DRMDevice2 *iface,
1234 IDirect3D2 *d3d, IDirect3DDevice2 *d3d_device)
1235{
1237
1238 TRACE("iface %p, d3d %p, d3d_device %p.\n", iface, d3d, d3d_device);
1239
1240 return d3drm_device3_InitFromD3D2(&device->IDirect3DRMDevice3_iface, d3d, d3d_device);
1241}
1242
1243static HRESULT WINAPI d3drm_device3_InitFromSurface(IDirect3DRMDevice3 *iface,
1244 GUID *guid, IDirectDraw *ddraw, IDirectDrawSurface *backbuffer)
1245{
1246 FIXME("iface %p, guid %s, ddraw %p, backbuffer %p stub!\n",
1247 iface, debugstr_guid(guid), ddraw, backbuffer);
1248
1249 return E_NOTIMPL;
1250}
1251
1252static HRESULT WINAPI d3drm_device2_InitFromSurface(IDirect3DRMDevice2 *iface,
1253 GUID *guid, IDirectDraw *ddraw, IDirectDrawSurface *backbuffer)
1254{
1256
1257 TRACE("iface %p, guid %s, ddraw %p, backbuffer %p.\n",
1258 iface, debugstr_guid(guid), ddraw, backbuffer);
1259
1260 return d3drm_device3_InitFromSurface(&device->IDirect3DRMDevice3_iface, guid, ddraw, backbuffer);
1261}
1262
1263static HRESULT WINAPI d3drm_device3_SetRenderMode(IDirect3DRMDevice3 *iface, DWORD flags)
1264{
1266
1267 TRACE("iface %p, flags %#x.\n", iface, flags);
1268
1269 device->rendermode = flags;
1270
1271 return D3DRM_OK;
1272}
1273
1274static HRESULT WINAPI d3drm_device2_SetRenderMode(IDirect3DRMDevice2 *iface, DWORD flags)
1275{
1277
1278 TRACE("iface %p, flags %#x.\n", iface, flags);
1279
1280 return d3drm_device3_SetRenderMode(&device->IDirect3DRMDevice3_iface, flags);
1281}
1282
1283static DWORD WINAPI d3drm_device3_GetRenderMode(IDirect3DRMDevice3 *iface)
1284{
1286
1287 TRACE("iface %p.\n", iface);
1288
1289 return device->rendermode;
1290}
1291
1292static DWORD WINAPI d3drm_device2_GetRenderMode(IDirect3DRMDevice2 *iface)
1293{
1295
1296 TRACE("iface %p.\n", iface);
1297
1298 return d3drm_device3_GetRenderMode(&device->IDirect3DRMDevice3_iface);
1299}
1300
1301static HRESULT WINAPI d3drm_device3_GetDirect3DDevice2(IDirect3DRMDevice3 *iface, IDirect3DDevice2 **d3d_device)
1302{
1304
1305 TRACE("iface %p, d3d_device %p.\n", iface, d3d_device);
1306
1307 if (FAILED(IDirect3DDevice_QueryInterface(device->device, &IID_IDirect3DDevice2, (void**)d3d_device)))
1308 return D3DRMERR_BADOBJECT;
1309
1310 return D3DRM_OK;
1311}
1312
1313static HRESULT WINAPI d3drm_device2_GetDirect3DDevice2(IDirect3DRMDevice2 *iface, IDirect3DDevice2 **d3d_device)
1314{
1316
1317 TRACE("iface %p, d3d_device %p.\n", iface, d3d_device);
1318
1319 IDirect3DDevice_QueryInterface(device->device, &IID_IDirect3DDevice2, (void**)d3d_device);
1320
1321 /* d3drm returns D3DRM_OK even if the call fails. */
1322 return D3DRM_OK;
1323}
1324
1326 DWORD bitdepths, DWORD flags, DDPIXELFORMAT *pf)
1327{
1328 FIXME("iface %p, bitdepths %u, flags %#x, pf %p stub!\n", iface, bitdepths, flags, pf);
1329
1330 return E_NOTIMPL;
1331}
1332
1333static HRESULT WINAPI d3drm_device3_RenderStateChange(IDirect3DRMDevice3 *iface,
1335{
1336 FIXME("iface %p, state %#x, value %#x, flags %#x stub!\n", iface, state, value, flags);
1337
1338 return E_NOTIMPL;
1339}
1340
1341static HRESULT WINAPI d3drm_device3_LightStateChange(IDirect3DRMDevice3 *iface,
1343{
1344 FIXME("iface %p, state %#x, value %#x, flags %#x stub!\n", iface, state, value, flags);
1345
1346 return E_NOTIMPL;
1347}
1348
1349static HRESULT WINAPI d3drm_device3_GetStateChangeOptions(IDirect3DRMDevice3 *iface,
1350 DWORD state_class, DWORD state_idx, DWORD *flags)
1351{
1352 FIXME("iface %p, state_class %#x, state_idx %#x, flags %p stub!\n",
1353 iface, state_class, state_idx, flags);
1354
1355 return E_NOTIMPL;
1356}
1357
1358static HRESULT WINAPI d3drm_device3_SetStateChangeOptions(IDirect3DRMDevice3 *iface,
1359 DWORD state_class, DWORD state_idx, DWORD flags)
1360{
1361 FIXME("iface %p, state_class %#x, state_idx %#x, flags %#x stub!\n",
1362 iface, state_class, state_idx, flags);
1363
1364 return E_NOTIMPL;
1365}
1366
1367static const struct IDirect3DRMDevice3Vtbl d3drm_device3_vtbl =
1368{
1413};
1414
1415static const struct IDirect3DRMDevice2Vtbl d3drm_device2_vtbl =
1416{
1456};
1457
1458static const struct IDirect3DRMDeviceVtbl d3drm_device1_vtbl =
1459{
1494};
1495
1496static HRESULT WINAPI d3drm_device_win_QueryInterface(IDirect3DRMWinDevice *iface, REFIID riid, void **out)
1497{
1499
1500 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
1501
1502 return d3drm_device3_QueryInterface(&device->IDirect3DRMDevice3_iface, riid, out);
1503}
1504
1505static ULONG WINAPI d3drm_device_win_AddRef(IDirect3DRMWinDevice *iface)
1506{
1508
1509 TRACE("iface %p.\n", iface);
1510
1511 return d3drm_device3_AddRef(&device->IDirect3DRMDevice3_iface);
1512}
1513
1514static ULONG WINAPI d3drm_device_win_Release(IDirect3DRMWinDevice *iface)
1515{
1517
1518 TRACE("iface %p.\n", iface);
1519
1520 return d3drm_device3_Release(&device->IDirect3DRMDevice3_iface);
1521}
1522
1523static HRESULT WINAPI d3drm_device_win_Clone(IDirect3DRMWinDevice *iface,
1524 IUnknown *outer, REFIID iid, void **out)
1525{
1527
1528 TRACE("iface %p, outer %p, iid %s, out %p\n", iface, outer, debugstr_guid(iid), out);
1529
1530 return d3drm_device3_Clone(&device->IDirect3DRMDevice3_iface, outer, iid, out);
1531}
1532
1533static HRESULT WINAPI d3drm_device_win_AddDestroyCallback(IDirect3DRMWinDevice *iface,
1534 D3DRMOBJECTCALLBACK cb, void *ctx)
1535{
1536 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
1537
1538 return E_NOTIMPL;
1539}
1540
1541static HRESULT WINAPI d3drm_device_win_DeleteDestroyCallback(IDirect3DRMWinDevice *iface,
1542 D3DRMOBJECTCALLBACK cb, void *ctx)
1543{
1544 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
1545
1546 return E_NOTIMPL;
1547}
1548
1549static HRESULT WINAPI d3drm_device_win_SetAppData(IDirect3DRMWinDevice *iface, DWORD data)
1550{
1552
1553 TRACE("iface %p, data %#x.\n", iface, data);
1554
1555 return d3drm_device3_SetAppData(&device->IDirect3DRMDevice3_iface, data);
1556}
1557
1558static DWORD WINAPI d3drm_device_win_GetAppData(IDirect3DRMWinDevice *iface)
1559{
1561
1562 TRACE("iface %p.\n", iface);
1563
1564 return d3drm_device3_GetAppData(&device->IDirect3DRMDevice3_iface);
1565}
1566
1567static HRESULT WINAPI d3drm_device_win_SetName(IDirect3DRMWinDevice *iface, const char *name)
1568{
1570
1571 TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
1572
1573 return d3drm_device3_SetName(&device->IDirect3DRMDevice3_iface, name);
1574}
1575
1576static HRESULT WINAPI d3drm_device_win_GetName(IDirect3DRMWinDevice *iface, DWORD *size, char *name)
1577{
1579
1580 TRACE("iface %p, size %p, name %p.\n", iface, size, name);
1581
1582 return d3drm_device3_GetName(&device->IDirect3DRMDevice3_iface, size, name);
1583}
1584
1585static HRESULT WINAPI d3drm_device_win_GetClassName(IDirect3DRMWinDevice *iface, DWORD *size, char *name)
1586{
1588
1589 TRACE("iface %p, size %p, name %p.\n", iface, size, name);
1590
1591 return d3drm_device3_GetClassName(&device->IDirect3DRMDevice3_iface, size, name);
1592}
1593
1594static HRESULT WINAPI d3drm_device_win_HandlePaint(IDirect3DRMWinDevice *iface, HDC dc)
1595{
1596 FIXME("iface %p, dc %p stub!\n", iface, dc);
1597
1598 return D3DRM_OK;
1599}
1600
1601static HRESULT WINAPI d3drm_device_win_HandleActivate(IDirect3DRMWinDevice *iface, WORD wparam)
1602{
1603 FIXME("iface %p, wparam %#x stub!\n", iface, wparam);
1604
1605 return D3DRM_OK;
1606}
1607
1608static const struct IDirect3DRMWinDeviceVtbl d3drm_device_win_vtbl =
1609{
1623};
1624
1625struct d3drm_device *unsafe_impl_from_IDirect3DRMDevice3(IDirect3DRMDevice3 *iface)
1626{
1627 if (!iface)
1628 return NULL;
1629 assert(iface->lpVtbl == &d3drm_device3_vtbl);
1630
1631 return impl_from_IDirect3DRMDevice3(iface);
1632}
1633
1635{
1636 static const char classname[] = "Device";
1637 struct d3drm_device *object;
1638
1639 TRACE("device %p, d3drm %p.\n", device, d3drm);
1640
1641 if (!(object = heap_alloc_zero(sizeof(*object))))
1642 return E_OUTOFMEMORY;
1643
1644 object->IDirect3DRMDevice_iface.lpVtbl = &d3drm_device1_vtbl;
1645 object->IDirect3DRMDevice2_iface.lpVtbl = &d3drm_device2_vtbl;
1646 object->IDirect3DRMDevice3_iface.lpVtbl = &d3drm_device3_vtbl;
1647 object->IDirect3DRMWinDevice_iface.lpVtbl = &d3drm_device_win_vtbl;
1648 object->d3drm = d3drm;
1650
1651 *device = object;
1652
1653 return D3DRM_OK;
1654}
@ wparam
Definition: SystemMenu.c:30
static int state
Definition: maze.c:121
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
#define IDirect3D2_QueryInterface(p, a, b)
Definition: d3d.h:278
#define IDirect3DDevice_AddRef(p)
Definition: d3d.h:965
#define IDirect3D2_CreateDevice(p, a, b, c)
Definition: d3d.h:287
#define IDirect3DDevice2_QueryInterface(p, a, b)
Definition: d3d.h:1062
#define IDirect3D_Release(p)
Definition: d3d.h:233
#define IDirect3D_QueryInterface(p, a, b)
Definition: d3d.h:231
#define IDirect3DDevice_QueryInterface(p, a, b)
Definition: d3d.h:964
#define IDirect3DDevice2_GetRenderTarget(p, a)
Definition: d3d.h:1079
#define IDirect3D2_Release(p)
Definition: d3d.h:280
#define IDirect3DDevice2_Release(p)
Definition: d3d.h:1064
#define IDirect3DDevice_Release(p)
Definition: d3d.h:966
#define D3DRM_OK
Definition: d3drm.h:486
#define D3DRMERR_BADVALUE
Definition: d3drm.h:496
#define IDirect3DRM_Release(p)
Definition: d3drm.h:111
#define D3DRMERR_BADOBJECT
Definition: d3drm.h:487
#define IDirect3DRM_AddRef(p)
Definition: d3drm.h:110
void d3drm_object_cleanup(IDirect3DRMObject *iface, struct d3drm_object *object)
Definition: d3drm_main.c:153
void d3drm_object_init(struct d3drm_object *object, const char *classname)
Definition: d3drm_main.c:39
HRESULT d3drm_object_get_name(struct d3drm_object *object, DWORD *size, char *name)
Definition: d3drm_main.c:111
HRESULT d3drm_object_delete_destroy_callback(struct d3drm_object *object, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: d3drm_main.c:72
HRESULT d3drm_object_add_destroy_callback(struct d3drm_object *object, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: d3drm_main.c:55
HRESULT d3drm_object_set_name(struct d3drm_object *object, const char *name)
Definition: d3drm_main.c:135
HRESULT d3drm_object_get_class_name(struct d3drm_object *object, DWORD *size, char *name)
Definition: d3drm_main.c:92
DWORD D3DRMRENDERQUALITY
Definition: d3drmdef.h:89
enum _D3DRMTEXTUREQUALITY D3DRMTEXTUREQUALITY
void(__cdecl * D3DRMUPDATECALLBACK)(struct IDirect3DRMDevice *device, void *ctx, int count, D3DRECT *rects)
Definition: d3drmobj.h:160
void(__cdecl * D3DRMOBJECTCALLBACK)(struct IDirect3DRMObject *obj, void *arg)
Definition: d3drmobj.h:157
D3DRENDERSTATETYPE
Definition: d3dtypes.h:874
D3DLIGHTSTATETYPE
Definition: d3dtypes.h:860
DWORD D3DCOLORMODEL
Definition: d3dtypes.h:629
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
static HRESULT WINAPI d3drm_device1_AddDestroyCallback(IDirect3DRMDevice *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: device.c:412
static HRESULT WINAPI d3drm_device2_SetName(IDirect3DRMDevice2 *iface, const char *name)
Definition: device.c:517
static DWORD WINAPI d3drm_device2_GetShades(IDirect3DRMDevice2 *iface)
Definition: device.c:977
static BOOL WINAPI d3drm_device3_GetDither(IDirect3DRMDevice3 *iface)
Definition: device.c:943
static HRESULT WINAPI d3drm_device1_SetName(IDirect3DRMDevice *iface, const char *name)
Definition: device.c:526
static DWORD WINAPI d3drm_device3_GetWireframeOptions(IDirect3DRMDevice3 *iface)
Definition: device.c:1074
static HRESULT WINAPI d3drm_device2_Init(IDirect3DRMDevice2 *iface, ULONG width, ULONG height)
Definition: device.c:601
static HRESULT WINAPI d3drm_device2_Clone(IDirect3DRMDevice2 *iface, IUnknown *outer, REFIID iid, void **out)
Definition: device.c:372
static HRESULT WINAPI d3drm_device3_DeleteDestroyCallback(IDirect3DRMDevice3 *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: device.c:422
static HRESULT WINAPI d3drm_device2_GetName(IDirect3DRMDevice2 *iface, DWORD *size, char *name)
Definition: device.c:544
static const struct IDirect3DRMDevice2Vtbl d3drm_device2_vtbl
Definition: device.c:1415
static HRESULT WINAPI d3drm_device3_SetStateChangeOptions(IDirect3DRMDevice3 *iface, DWORD state_class, DWORD state_idx, DWORD flags)
Definition: device.c:1358
static HRESULT WINAPI d3drm_device2_InitFromD3D(IDirect3DRMDevice2 *iface, IDirect3D *d3d, IDirect3DDevice *d3d_device)
Definition: device.c:630
static HRESULT WINAPI d3drm_device_win_AddDestroyCallback(IDirect3DRMWinDevice *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: device.c:1533
static HRESULT WINAPI d3drm_device1_Init(IDirect3DRMDevice *iface, ULONG width, ULONG height)
Definition: device.c:610
static DWORD WINAPI d3drm_device3_GetWidth(IDirect3DRMDevice3 *iface)
Definition: device.c:1022
static D3DCOLORMODEL WINAPI d3drm_device3_GetColorModel(IDirect3DRMDevice3 *iface)
Definition: device.c:1126
static HRESULT WINAPI d3drm_device3_SetName(IDirect3DRMDevice3 *iface, const char *name)
Definition: device.c:508
struct d3drm_device * unsafe_impl_from_IDirect3DRMDevice3(IDirect3DRMDevice3 *iface)
Definition: device.c:1625
static struct d3drm_device * impl_from_IDirect3DRMDevice3(IDirect3DRMDevice3 *iface)
Definition: device.c:35
static D3DRMTEXTUREQUALITY WINAPI d3drm_device3_GetTextureQuality(IDirect3DRMDevice3 *iface)
Definition: device.c:1151
static const struct IDirect3DRMDevice3Vtbl d3drm_device3_vtbl
Definition: device.c:1367
static HRESULT WINAPI d3drm_device1_SetTextureQuality(IDirect3DRMDevice *iface, D3DRMTEXTUREQUALITY quality)
Definition: device.c:909
static HRESULT WINAPI d3drm_device3_GetClassName(IDirect3DRMDevice3 *iface, DWORD *size, char *name)
Definition: device.c:562
HRESULT d3drm_device_init(struct d3drm_device *device, UINT version, IDirectDraw *ddraw, IDirectDrawSurface *surface, BOOL create_z_surface)
Definition: device.c:120
static HRESULT WINAPI d3drm_device1_GetName(IDirect3DRMDevice *iface, DWORD *size, char *name)
Definition: device.c:553
static ULONG WINAPI d3drm_device1_Release(IDirect3DRMDevice *iface)
Definition: device.c:355
static HRESULT WINAPI d3drm_device2_InitFromClipper(IDirect3DRMDevice2 *iface, IDirectDrawClipper *clipper, GUID *guid, int width, int height)
Definition: device.c:667
static HRESULT WINAPI d3drm_device1_GetClassName(IDirect3DRMDevice *iface, DWORD *size, char *name)
Definition: device.c:580
static HRESULT WINAPI d3drm_device3_SetQuality(IDirect3DRMDevice3 *iface, D3DRMRENDERQUALITY quality)
Definition: device.c:864
static HRESULT WINAPI d3drm_device3_Update(IDirect3DRMDevice3 *iface)
Definition: device.c:691
static HRESULT WINAPI d3drm_device_win_QueryInterface(IDirect3DRMWinDevice *iface, REFIID riid, void **out)
Definition: device.c:1496
static HRESULT WINAPI d3drm_device2_InitFromD3D2(IDirect3DRMDevice2 *iface, IDirect3D2 *d3d, IDirect3DDevice2 *d3d_device)
Definition: device.c:1233
static HRESULT WINAPI d3drm_device_win_GetClassName(IDirect3DRMWinDevice *iface, DWORD *size, char *name)
Definition: device.c:1585
static HRESULT WINAPI d3drm_device3_Init(IDirect3DRMDevice3 *iface, ULONG width, ULONG height)
Definition: device.c:589
static HRESULT WINAPI d3drm_device3_AddDestroyCallback(IDirect3DRMDevice3 *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: device.c:392
static DWORD WINAPI d3drm_device2_GetWidth(IDirect3DRMDevice2 *iface)
Definition: device.c:1031
static HRESULT WINAPI d3drm_device3_InitFromD3D(IDirect3DRMDevice3 *iface, IDirect3D *d3d, IDirect3DDevice *d3d_device)
Definition: device.c:619
static HRESULT WINAPI d3drm_device2_GetDirect3DDevice(IDirect3DRMDevice2 *iface, IDirect3DDevice **d3d_device)
Definition: device.c:1187
static DWORD WINAPI d3drm_device1_GetAppData(IDirect3DRMDevice *iface)
Definition: device.c:499
static HRESULT WINAPI d3drm_device3_FindPreferredTextureFormat(IDirect3DRMDevice3 *iface, DWORD bitdepths, DWORD flags, DDPIXELFORMAT *pf)
Definition: device.c:1325
static struct d3drm_device * impl_from_IDirect3DRMDevice2(IDirect3DRMDevice2 *iface)
Definition: device.c:30
static D3DRMRENDERQUALITY WINAPI d3drm_device1_GetQuality(IDirect3DRMDevice *iface)
Definition: device.c:1117
static HRESULT WINAPI d3drm_device3_SetRenderMode(IDirect3DRMDevice3 *iface, DWORD flags)
Definition: device.c:1263
static ULONG WINAPI d3drm_device3_Release(IDirect3DRMDevice3 *iface)
Definition: device.c:333
static HRESULT WINAPI d3drm_device3_GetDirect3DDevice(IDirect3DRMDevice3 *iface, IDirect3DDevice **d3d_device)
Definition: device.c:1176
static struct d3drm_device * impl_from_IDirect3DRMDevice(IDirect3DRMDevice *iface)
Definition: device.c:25
static DWORD WINAPI d3drm_device1_GetWidth(IDirect3DRMDevice *iface)
Definition: device.c:1040
static HRESULT WINAPI d3drm_device2_SetBufferCount(IDirect3DRMDevice2 *iface, DWORD count)
Definition: device.c:767
static HRESULT WINAPI d3drm_device2_InitFromSurface(IDirect3DRMDevice2 *iface, GUID *guid, IDirectDraw *ddraw, IDirectDrawSurface *backbuffer)
Definition: device.c:1252
static ULONG WINAPI d3drm_device1_AddRef(IDirect3DRMDevice *iface)
Definition: device.c:324
static DWORD WINAPI d3drm_device1_GetWireframeOptions(IDirect3DRMDevice *iface)
Definition: device.c:1090
static HRESULT WINAPI d3drm_device1_AddUpdateCallback(IDirect3DRMDevice *iface, D3DRMUPDATECALLBACK cb, void *ctx)
Definition: device.c:728
static HRESULT WINAPI d3drm_device1_GetViewports(IDirect3DRMDevice *iface, IDirect3DRMViewportArray **array)
Definition: device.c:934
static HRESULT WINAPI d3drm_device1_SetAppData(IDirect3DRMDevice *iface, DWORD data)
Definition: device.c:472
static HRESULT WINAPI d3drm_device_win_SetName(IDirect3DRMWinDevice *iface, const char *name)
Definition: device.c:1567
static HRESULT WINAPI d3drm_device_win_HandlePaint(IDirect3DRMWinDevice *iface, HDC dc)
Definition: device.c:1594
static DWORD WINAPI d3drm_device1_GetHeight(IDirect3DRMDevice *iface)
Definition: device.c:1013
static HRESULT WINAPI d3drm_device3_SetDither(IDirect3DRMDevice3 *iface, BOOL enable)
Definition: device.c:810
static const struct IDirect3DRMWinDeviceVtbl d3drm_device_win_vtbl
Definition: device.c:1608
static DWORD WINAPI d3drm_device3_GetBufferCount(IDirect3DRMDevice3 *iface)
Definition: device.c:785
static HRESULT WINAPI d3drm_device2_GetViewports(IDirect3DRMDevice2 *iface, IDirect3DRMViewportArray **array)
Definition: device.c:925
static HRESULT WINAPI d3drm_device1_DeleteDestroyCallback(IDirect3DRMDevice *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: device.c:442
static HRESULT WINAPI d3drm_device2_GetDirect3DDevice2(IDirect3DRMDevice2 *iface, IDirect3DDevice2 **d3d_device)
Definition: device.c:1313
static HRESULT WINAPI d3drm_device1_SetDither(IDirect3DRMDevice *iface, BOOL enable)
Definition: device.c:830
static HRESULT d3drm_device_set_ddraw_device_d3d(struct d3drm_device *device, IDirect3D *d3d, IDirect3DDevice *d3d_device)
Definition: device.c:203
static DWORD WINAPI d3drm_device3_GetTrianglesDrawn(IDirect3DRMDevice3 *iface)
Definition: device.c:1049
static ULONG WINAPI d3drm_device2_AddRef(IDirect3DRMDevice2 *iface)
Definition: device.c:315
static HRESULT WINAPI d3drm_device2_AddUpdateCallback(IDirect3DRMDevice2 *iface, D3DRMUPDATECALLBACK cb, void *ctx)
Definition: device.c:720
static HRESULT WINAPI d3drm_device1_GetDirect3DDevice(IDirect3DRMDevice *iface, IDirect3DDevice **d3d_device)
Definition: device.c:1196
static BOOL WINAPI d3drm_device2_GetDither(IDirect3DRMDevice2 *iface)
Definition: device.c:952
static HRESULT WINAPI d3drm_device1_SetQuality(IDirect3DRMDevice *iface, D3DRMRENDERQUALITY quality)
Definition: device.c:884
static HRESULT WINAPI d3drm_device2_GetClassName(IDirect3DRMDevice2 *iface, DWORD *size, char *name)
Definition: device.c:571
static DWORD WINAPI d3drm_device2_GetWireframeOptions(IDirect3DRMDevice2 *iface)
Definition: device.c:1081
static D3DRMRENDERQUALITY WINAPI d3drm_device2_GetQuality(IDirect3DRMDevice2 *iface)
Definition: device.c:1108
static HRESULT WINAPI d3drm_device3_InitFromD3D2(IDirect3DRMDevice3 *iface, IDirect3D2 *d3d, IDirect3DDevice2 *d3d_device)
Definition: device.c:1205
static HRESULT WINAPI d3drm_device3_DeleteUpdateCallback(IDirect3DRMDevice3 *iface, D3DRMUPDATECALLBACK cb, void *ctx)
Definition: device.c:736
static HRESULT WINAPI d3drm_device1_DeleteUpdateCallback(IDirect3DRMDevice *iface, D3DRMUPDATECALLBACK cb, void *ctx)
Definition: device.c:752
HRESULT d3drm_device_create(struct d3drm_device **device, IDirect3DRM *d3drm)
Definition: device.c:1634
static HRESULT WINAPI d3drm_device_win_GetName(IDirect3DRMWinDevice *iface, DWORD *size, char *name)
Definition: device.c:1576
static D3DCOLORMODEL WINAPI d3drm_device1_GetColorModel(IDirect3DRMDevice *iface)
Definition: device.c:1142
static DWORD WINAPI d3drm_device1_GetBufferCount(IDirect3DRMDevice *iface)
Definition: device.c:801
static HRESULT WINAPI d3drm_device3_GetStateChangeOptions(IDirect3DRMDevice3 *iface, DWORD state_class, DWORD state_idx, DWORD *flags)
Definition: device.c:1349
static HRESULT WINAPI d3drm_device2_SetDither(IDirect3DRMDevice2 *iface, BOOL enable)
Definition: device.c:821
static DWORD WINAPI d3drm_device3_GetHeight(IDirect3DRMDevice3 *iface)
Definition: device.c:995
static DWORD WINAPI d3drm_device1_GetTrianglesDrawn(IDirect3DRMDevice *iface)
Definition: device.c:1065
static HRESULT WINAPI d3drm_device2_DeleteDestroyCallback(IDirect3DRMDevice2 *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: device.c:432
static HRESULT WINAPI d3drm_device1_Update(IDirect3DRMDevice *iface)
Definition: device.c:705
static DWORD WINAPI d3drm_device2_GetAppData(IDirect3DRMDevice2 *iface)
Definition: device.c:490
static ULONG WINAPI d3drm_device_win_Release(IDirect3DRMWinDevice *iface)
Definition: device.c:1514
static HRESULT WINAPI d3drm_device2_SetAppData(IDirect3DRMDevice2 *iface, DWORD data)
Definition: device.c:463
static DWORD WINAPI d3drm_device3_GetRenderMode(IDirect3DRMDevice3 *iface)
Definition: device.c:1283
static D3DRMTEXTUREQUALITY WINAPI d3drm_device1_GetTextureQuality(IDirect3DRMDevice *iface)
Definition: device.c:1167
static HRESULT WINAPI d3drm_device_win_Clone(IDirect3DRMWinDevice *iface, IUnknown *outer, REFIID iid, void **out)
Definition: device.c:1523
void d3drm_device_destroy(struct d3drm_device *device)
Definition: device.c:40
static ULONG WINAPI d3drm_device_win_AddRef(IDirect3DRMWinDevice *iface)
Definition: device.c:1505
HRESULT d3drm_device_create_surfaces_from_clipper(struct d3drm_device *object, IDirectDraw *ddraw, IDirectDrawClipper *clipper, int width, int height, IDirectDrawSurface **surface)
Definition: device.c:69
static ULONG WINAPI d3drm_device3_AddRef(IDirect3DRMDevice3 *iface)
Definition: device.c:305
static DWORD WINAPI d3drm_device2_GetHeight(IDirect3DRMDevice2 *iface)
Definition: device.c:1004
static HRESULT WINAPI d3drm_device3_GetViewports(IDirect3DRMDevice3 *iface, IDirect3DRMViewportArray **array)
Definition: device.c:918
static DWORD WINAPI d3drm_device2_GetTrianglesDrawn(IDirect3DRMDevice2 *iface)
Definition: device.c:1056
static HRESULT WINAPI d3drm_device3_RenderStateChange(IDirect3DRMDevice3 *iface, D3DRENDERSTATETYPE state, DWORD value, DWORD flags)
Definition: device.c:1333
static HRESULT WINAPI d3drm_device3_SetShades(IDirect3DRMDevice3 *iface, DWORD count)
Definition: device.c:839
static D3DRMTEXTUREQUALITY WINAPI d3drm_device2_GetTextureQuality(IDirect3DRMDevice2 *iface)
Definition: device.c:1158
static DWORD WINAPI d3drm_device3_GetShades(IDirect3DRMDevice3 *iface)
Definition: device.c:970
static D3DCOLORMODEL WINAPI d3drm_device2_GetColorModel(IDirect3DRMDevice2 *iface)
Definition: device.c:1133
static DWORD WINAPI d3drm_device3_GetAppData(IDirect3DRMDevice3 *iface)
Definition: device.c:481
static HRESULT WINAPI d3drm_device3_AddUpdateCallback(IDirect3DRMDevice3 *iface, D3DRMUPDATECALLBACK cb, void *ctx)
Definition: device.c:712
static HRESULT WINAPI d3drm_device3_InitFromClipper(IDirect3DRMDevice3 *iface, IDirectDrawClipper *clipper, GUID *guid, int width, int height)
Definition: device.c:653
static HRESULT WINAPI d3drm_device2_SetRenderMode(IDirect3DRMDevice2 *iface, DWORD flags)
Definition: device.c:1274
static HRESULT WINAPI d3drm_device3_LightStateChange(IDirect3DRMDevice3 *iface, D3DLIGHTSTATETYPE state, DWORD value, DWORD flags)
Definition: device.c:1341
static D3DRMRENDERQUALITY WINAPI d3drm_device3_GetQuality(IDirect3DRMDevice3 *iface)
Definition: device.c:1099
static HRESULT WINAPI d3drm_device2_DeleteUpdateCallback(IDirect3DRMDevice2 *iface, D3DRMUPDATECALLBACK cb, void *ctx)
Definition: device.c:744
static struct d3drm_device * impl_from_IDirect3DRMWinDevice(IDirect3DRMWinDevice *iface)
Definition: device.c:64
static HRESULT WINAPI d3drm_device2_AddDestroyCallback(IDirect3DRMDevice2 *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: device.c:402
static HRESULT WINAPI d3drm_device1_InitFromClipper(IDirect3DRMDevice *iface, IDirectDrawClipper *clipper, GUID *guid, int width, int height)
Definition: device.c:679
static HRESULT WINAPI d3drm_device3_SetBufferCount(IDirect3DRMDevice3 *iface, DWORD count)
Definition: device.c:760
static HRESULT WINAPI d3drm_device2_Update(IDirect3DRMDevice2 *iface)
Definition: device.c:698
static DWORD WINAPI d3drm_device2_GetBufferCount(IDirect3DRMDevice2 *iface)
Definition: device.c:792
static HRESULT WINAPI d3drm_device_win_HandleActivate(IDirect3DRMWinDevice *iface, WORD wparam)
Definition: device.c:1601
static BOOL WINAPI d3drm_device1_GetDither(IDirect3DRMDevice *iface)
Definition: device.c:961
static HRESULT WINAPI d3drm_device3_GetDirect3DDevice2(IDirect3DRMDevice3 *iface, IDirect3DDevice2 **d3d_device)
Definition: device.c:1301
static HRESULT WINAPI d3drm_device3_SetTextureQuality(IDirect3DRMDevice3 *iface, D3DRMTEXTUREQUALITY quality)
Definition: device.c:893
static HRESULT WINAPI d3drm_device3_InitFromSurface(IDirect3DRMDevice3 *iface, GUID *guid, IDirectDraw *ddraw, IDirectDrawSurface *backbuffer)
Definition: device.c:1243
static HRESULT WINAPI d3drm_device3_Clone(IDirect3DRMDevice3 *iface, IUnknown *outer, REFIID iid, void **out)
Definition: device.c:364
static HRESULT WINAPI d3drm_device1_Clone(IDirect3DRMDevice *iface, IUnknown *outer, REFIID iid, void **out)
Definition: device.c:382
static HRESULT WINAPI d3drm_device_win_SetAppData(IDirect3DRMWinDevice *iface, DWORD data)
Definition: device.c:1549
static HRESULT WINAPI d3drm_device2_SetQuality(IDirect3DRMDevice2 *iface, D3DRMRENDERQUALITY quality)
Definition: device.c:875
static DWORD WINAPI d3drm_device2_GetRenderMode(IDirect3DRMDevice2 *iface)
Definition: device.c:1292
static HRESULT WINAPI d3drm_device_win_DeleteDestroyCallback(IDirect3DRMWinDevice *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: device.c:1541
static HRESULT WINAPI d3drm_device2_QueryInterface(IDirect3DRMDevice2 *iface, REFIID riid, void **out)
Definition: device.c:287
static HRESULT WINAPI d3drm_device1_QueryInterface(IDirect3DRMDevice *iface, REFIID riid, void **out)
Definition: device.c:296
static DWORD WINAPI d3drm_device1_GetShades(IDirect3DRMDevice *iface)
Definition: device.c:986
static HRESULT WINAPI d3drm_device2_SetTextureQuality(IDirect3DRMDevice2 *iface, D3DRMTEXTUREQUALITY quality)
Definition: device.c:900
static HRESULT WINAPI d3drm_device2_SetShades(IDirect3DRMDevice2 *iface, DWORD count)
Definition: device.c:846
static HRESULT WINAPI d3drm_device1_SetBufferCount(IDirect3DRMDevice *iface, DWORD count)
Definition: device.c:776
static HRESULT WINAPI d3drm_device3_QueryInterface(IDirect3DRMDevice3 *iface, REFIID riid, void **out)
Definition: device.c:252
static ULONG WINAPI d3drm_device2_Release(IDirect3DRMDevice2 *iface)
Definition: device.c:346
static HRESULT WINAPI d3drm_device1_SetShades(IDirect3DRMDevice *iface, DWORD count)
Definition: device.c:855
static HRESULT WINAPI d3drm_device3_SetAppData(IDirect3DRMDevice3 *iface, DWORD data)
Definition: device.c:452
static HRESULT WINAPI d3drm_device3_GetName(IDirect3DRMDevice3 *iface, DWORD *size, char *name)
Definition: device.c:535
static const struct IDirect3DRMDeviceVtbl d3drm_device1_vtbl
Definition: device.c:1458
static DWORD WINAPI d3drm_device_win_GetAppData(IDirect3DRMWinDevice *iface)
Definition: device.c:1558
static HRESULT WINAPI d3drm_device1_InitFromD3D(IDirect3DRMDevice *iface, IDirect3D *d3d, IDirect3DDevice *d3d_device)
Definition: device.c:640
static const WCHAR version[]
Definition: asmname.c:66
#define assert(x)
Definition: debug.h:53
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLsizeiptr size
Definition: glext.h:5919
GLbitfield flags
Definition: glext.h:7161
GLboolean enable
Definition: glext.h:11120
#define ds
Definition: i386-dis.c:443
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
int quality
Definition: jpeglib.h:992
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_a
Definition: kernel32.h:31
static const WCHAR dc[]
const GUID * guid
static HDC
Definition: imagelist.c:88
static const WCHAR desc[]
Definition: protectdata.c:36
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
static IHTMLWindow2 * window
Definition: events.c:77
unsigned int UINT
Definition: ndis.h:50
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
static FILE * out
Definition: regtests2xml.c:44
WCHAR classname[128]
Definition: startup.c:15
#define DDSD_WIDTH
Definition: ddraw.h:210
#define DDSCAPS_ZBUFFER
Definition: ddraw.h:267
#define DDSCL_NORMAL
Definition: ddraw.h:535
#define DDSD_HEIGHT
Definition: ddraw.h:209
#define DDSCAPS_PRIMARYSURFACE
Definition: ddraw.h:258
#define DDSD_ZBUFFERBITDEPTH
Definition: ddraw.h:213
#define DDERR_INVALIDCAPS
Definition: ddraw.h:75
#define DDSCAPS_OFFSCREENPLAIN
Definition: ddraw.h:255
#define DDSCAPS_3DDEVICE
Definition: ddraw.h:263
#define DDSD_CAPS
Definition: ddraw.h:208
#define memset(x, y, z)
Definition: compat.h:39
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3DRMDevice IDirect3DRMDevice_iface
IDirectDraw * ddraw
IDirectDrawSurface * render_target
IDirect3DRMWinDevice IDirect3DRMWinDevice_iface
IDirectDrawClipper * clipper
IDirect3DRMDevice2 IDirect3DRMDevice2_iface
IDirect3DRMDevice3 IDirect3DRMDevice3_iface
IDirectDrawSurface * primary_surface
IDirect3DRM * d3drm
Definition: d3drm.c:189
Definition: devices.h:37
Definition: name.c:39
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
Definition: pdh_main.c:94
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663