ReactOS 0.4.16-dev-125-g798ea90
callbacks_dd_hel.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS DirectX
4 * FILE: dll/directx/ddraw/Ddraw/callbacks_dd_hel.c
5 * PURPOSE: HEL Callbacks for Direct Draw
6 * PROGRAMMER: Magnus Olsen
7 *
8 */
9
10#include "rosdraw.h"
11
12
15
16/*
17 * Direct Draw Callbacks
18 */
19
21{
22 DX_STUB;
23}
24
26{
27 DX_STUB;
28}
29
30
32{
33 DX_STUB;
34}
35
36
38{
39 DEVMODE DevMode;
40
41 DX_STUB_str("in hel");
42
43 DevMode.dmSize = (WORD)sizeof(DEVMODE);
44 DevMode.dmDriverExtra = 0;
45
47
48 if (EnumDisplaySettingsEx(NULL, SetMode->dwModeIndex, &DevMode, 0 ) != 0)
49 {
50
51
52 if (ChangeDisplaySettings(&DevMode, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL)
53 {
54 DX_STUB_str("FAIL");
56 }
57 else
58 {
59 DX_STUB_str("OK");
60 SetMode->ddRVal = DD_OK;
61 }
62 }
63
65}
66
68{
69 DX_STUB;
70}
71
73{
74 DX_STUB;
75}
76
78{
79 DDRAWI_DDRAWPALETTE_GBL* ddPalGbl = lpCreatePalette->lpDDPalette;
80 LOGPALETTE* logPal ;
81 WORD size=1;
82
83 if(ddPalGbl->dwFlags & DDRAWIPAL_2)
84 size = 2;
85 else if(ddPalGbl->dwFlags & DDRAWIPAL_4)
86 size = 4;
87 else if(ddPalGbl->dwFlags & DDRAWIPAL_16)
88 size = 16;
89 else if(ddPalGbl->dwFlags & DDRAWIPAL_256)
90 size = 256;
91
92 DxHeapMemAlloc(logPal, sizeof(LOGPALETTE) + size*sizeof(PALETTEENTRY));
93 if(logPal == NULL)
94 {
95 lpCreatePalette->ddRVal = DDERR_OUTOFMEMORY;
97 }
98
99 logPal->palVersion = 0x300;
100 logPal->palNumEntries = size;
101 CopyMemory(&logPal->palPalEntry[0], lpCreatePalette->lpColorTable, size*sizeof(PALETTEENTRY));
102
103 ddPalGbl->hHELGDIPalette = CreatePalette(logPal);
104
105 if (ddPalGbl->hHELGDIPalette == NULL)
106 {
107 DxHeapMemFree(logPal);
108 lpCreatePalette->ddRVal = DDERR_INVALIDOBJECT;
110 }
111
112 DxHeapMemFree(logPal);
113 ddPalGbl->lpColorTable = lpCreatePalette->lpColorTable;
114 ddPalGbl->dwFlags |= DDRAWIPAL_INHEL | DDRAWIPAL_GDI ;
115 lpCreatePalette->ddRVal = DD_OK;
117}
118
120{
121 DX_STUB;
122}
123
125{
127 DX_STUB_str("Not implement yet, return DD_OK for not bsod\n");
128 lpSetExclusiveMode->ddRVal = DD_OK;
129
131}
132
134{
135 DX_STUB;
136}
137
DWORD CALLBACK HelDdSetExclusiveMode(LPDDHAL_SETEXCLUSIVEMODEDATA lpSetExclusiveMode)
DWORD CALLBACK HelDdFlipToGDISurface(LPDDHAL_FLIPTOGDISURFACEDATA lpFlipToGDISurface)
DWORD CALLBACK HelDdCanCreateSurface(LPDDHAL_CANCREATESURFACEDATA lpCanCreateSurface)
DWORD CALLBACK HelDdSetMode(LPDDHAL_SETMODEDATA SetMode)
DWORD pixelformatsCount
DWORD CALLBACK HelDdGetScanLine(LPDDHAL_GETSCANLINEDATA lpGetScanLine)
DWORD CALLBACK HelDdCreateSurface(LPDDHAL_CREATESURFACEDATA lpCreateSurface)
DWORD CALLBACK HelDdDestroyDriver(LPDDHAL_DESTROYDRIVERDATA lpDestroyDriver)
DWORD CALLBACK HelDdCreatePalette(LPDDHAL_CREATEPALETTEDATA lpCreatePalette)
DWORD CALLBACK HelDdWaitForVerticalBlank(LPDDHAL_WAITFORVERTICALBLANKDATA lpWaitForVerticalBlank)
DWORD CALLBACK HelDdSetColorKey(LPDDHAL_DRVSETCOLORKEYDATA lpDrvSetColorKey)
DDPIXELFORMAT pixelformats[]
#define DDHAL_DRIVER_HANDLED
Definition: ddrawi.h:321
#define DDRAWIPAL_GDI
Definition: ddrawi.h:1563
#define DDRAWIPAL_2
Definition: ddrawi.h:1572
#define DDRAWIPAL_16
Definition: ddrawi.h:1562
#define DDRAWIPAL_INHEL
Definition: ddrawi.h:1568
#define DDRAWIPAL_4
Definition: ddrawi.h:1571
#define DDRAWIPAL_256
Definition: ddrawi.h:1561
#define NULL
Definition: types.h:112
#define CALLBACK
Definition: compat.h:35
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLsizeiptr size
Definition: glext.h:5919
#define DX_STUB_str(x)
Definition: rosdraw.h:254
#define DxHeapMemAlloc(p, m)
Definition: rosdraw.h:113
#define DX_STUB
Definition: rosdraw.h:224
#define DxHeapMemFree(p)
Definition: rosdraw.h:120
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DDERR_UNSUPPORTEDMODE
Definition: ddraw.h:164
#define DDERR_INVALIDOBJECT
Definition: ddraw.h:78
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
#define DD_OK
Definition: ddraw.h:186
LPPALETTEENTRY lpColorTable
Definition: ddrawi.h:794
LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette
Definition: ddrawi.h:793
HRESULT ddRVal
Definition: ddrawi.h:768
DWORD dwModeIndex
Definition: ddrawi.h:767
LPPALETTEENTRY lpColorTable
Definition: ddrawi.h:1550
WORD dmDriverExtra
Definition: wingdi.h:1569
WORD dmSize
Definition: wingdi.h:1568
WORD palNumEntries
Definition: wingdi.h:1834
WORD palVersion
Definition: wingdi.h:1833
#define CopyMemory
Definition: winbase.h:1710
HPALETTE WINAPI CreatePalette(_In_reads_(_Inexpressible_(2 *sizeof(WORD)+plpal->palNumEntries *sizeof(PALETTEENTRY))) const LOGPALETTE *)
#define DISP_CHANGE_SUCCESSFUL
Definition: winuser.h:190
#define CDS_FULLSCREEN
Definition: winuser.h:183