ReactOS  0.4.14-dev-293-g2b39b42
callbacks_dd_hel.c File Reference
#include "rosdraw.h"
Include dependency graph for callbacks_dd_hel.c:

Go to the source code of this file.

Functions

DWORD CALLBACK HelDdDestroyDriver (LPDDHAL_DESTROYDRIVERDATA lpDestroyDriver)
 
DWORD CALLBACK HelDdCreateSurface (LPDDHAL_CREATESURFACEDATA lpCreateSurface)
 
DWORD CALLBACK HelDdSetColorKey (LPDDHAL_DRVSETCOLORKEYDATA lpDrvSetColorKey)
 
DWORD CALLBACK HelDdSetMode (LPDDHAL_SETMODEDATA SetMode)
 
DWORD CALLBACK HelDdWaitForVerticalBlank (LPDDHAL_WAITFORVERTICALBLANKDATA lpWaitForVerticalBlank)
 
DWORD CALLBACK HelDdCanCreateSurface (LPDDHAL_CANCREATESURFACEDATA lpCanCreateSurface)
 
DWORD CALLBACK HelDdCreatePalette (LPDDHAL_CREATEPALETTEDATA lpCreatePalette)
 
DWORD CALLBACK HelDdGetScanLine (LPDDHAL_GETSCANLINEDATA lpGetScanLine)
 
DWORD CALLBACK HelDdSetExclusiveMode (LPDDHAL_SETEXCLUSIVEMODEDATA lpSetExclusiveMode)
 
DWORD CALLBACK HelDdFlipToGDISurface (LPDDHAL_FLIPTOGDISURFACEDATA lpFlipToGDISurface)
 

Variables

DDPIXELFORMAT pixelformats []
 
DWORD pixelformatsCount
 

Function Documentation

◆ HelDdCanCreateSurface()

DWORD CALLBACK HelDdCanCreateSurface ( LPDDHAL_CANCREATESURFACEDATA  lpCanCreateSurface)

Definition at line 72 of file callbacks_dd_hel.c.

73 {
74  DX_STUB;
75 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdCreatePalette()

DWORD CALLBACK HelDdCreatePalette ( LPDDHAL_CREATEPALETTEDATA  lpCreatePalette)

Definition at line 77 of file callbacks_dd_hel.c.

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;
96  return DDHAL_DRIVER_HANDLED;
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;
109  return DDHAL_DRIVER_HANDLED;
110  }
111 
112  DxHeapMemFree(logPal);
113  ddPalGbl->lpColorTable = lpCreatePalette->lpColorTable;
114  ddPalGbl->dwFlags |= DDRAWIPAL_INHEL | DDRAWIPAL_GDI ;
115  lpCreatePalette->ddRVal = DD_OK;
116  return DDHAL_DRIVER_HANDLED;
117 }
#define DDRAWIPAL_GDI
Definition: ddrawi.h:1563
#define DDRAWIPAL_256
Definition: ddrawi.h:1561
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
#define DxHeapMemFree(p)
Definition: rosdraw.h:120
LPPALETTEENTRY lpColorTable
Definition: ddrawi.h:1550
WORD palVersion
Definition: wingdi.h:1828
#define DDHAL_DRIVER_HANDLED
Definition: ddrawi.h:321
#define DD_OK
Definition: ddraw.h:186
#define DDERR_INVALIDOBJECT
Definition: ddraw.h:78
#define DDRAWIPAL_16
Definition: ddrawi.h:1562
smooth NULL
Definition: ftsmooth.c:416
LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette
Definition: ddrawi.h:793
LPPALETTEENTRY lpColorTable
Definition: ddrawi.h:794
GLsizeiptr size
Definition: glext.h:5919
HPALETTE WINAPI CreatePalette(_In_reads_(_Inexpressible_(2 *sizeof(WORD)+plpal->palNumEntries *sizeof(PALETTEENTRY))) const LOGPALETTE *)
#define DxHeapMemAlloc(p, m)
Definition: rosdraw.h:113
#define CopyMemory
Definition: winbase.h:1640
unsigned short WORD
Definition: ntddk_ex.h:93
#define DDRAWIPAL_INHEL
Definition: ddrawi.h:1568
#define DDRAWIPAL_2
Definition: ddrawi.h:1572
#define DDRAWIPAL_4
Definition: ddrawi.h:1571
WORD palNumEntries
Definition: wingdi.h:1829

Referenced by StartDirectDrawHel().

◆ HelDdCreateSurface()

DWORD CALLBACK HelDdCreateSurface ( LPDDHAL_CREATESURFACEDATA  lpCreateSurface)

Definition at line 25 of file callbacks_dd_hel.c.

26 {
27  DX_STUB;
28 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdDestroyDriver()

DWORD CALLBACK HelDdDestroyDriver ( LPDDHAL_DESTROYDRIVERDATA  lpDestroyDriver)

Definition at line 20 of file callbacks_dd_hel.c.

21 {
22  DX_STUB;
23 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdFlipToGDISurface()

DWORD CALLBACK HelDdFlipToGDISurface ( LPDDHAL_FLIPTOGDISURFACEDATA  lpFlipToGDISurface)

Definition at line 133 of file callbacks_dd_hel.c.

134 {
135  DX_STUB;
136 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdGetScanLine()

DWORD CALLBACK HelDdGetScanLine ( LPDDHAL_GETSCANLINEDATA  lpGetScanLine)

Definition at line 119 of file callbacks_dd_hel.c.

120 {
121  DX_STUB;
122 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdSetColorKey()

DWORD CALLBACK HelDdSetColorKey ( LPDDHAL_DRVSETCOLORKEYDATA  lpDrvSetColorKey)

Definition at line 31 of file callbacks_dd_hel.c.

32 {
33  DX_STUB;
34 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdSetExclusiveMode()

DWORD CALLBACK HelDdSetExclusiveMode ( LPDDHAL_SETEXCLUSIVEMODEDATA  lpSetExclusiveMode)

Definition at line 124 of file callbacks_dd_hel.c.

125 {
126  DX_WINDBG_trace();
127  DX_STUB_str("Not implement yet, return DD_OK for not bsod\n");
128  lpSetExclusiveMode->ddRVal = DD_OK;
129 
130  return DDHAL_DRIVER_HANDLED;
131 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB_str(x)
Definition: rosdraw.h:254
#define DDHAL_DRIVER_HANDLED
Definition: ddrawi.h:321
#define DD_OK
Definition: ddraw.h:186

Referenced by StartDirectDrawHel().

◆ HelDdSetMode()

DWORD CALLBACK HelDdSetMode ( LPDDHAL_SETMODEDATA  SetMode)

Definition at line 37 of file callbacks_dd_hel.c.

38 {
39  DEVMODE DevMode;
40 
41  DX_STUB_str("in hel");
42 
43  DevMode.dmSize = (WORD)sizeof(DEVMODE);
44  DevMode.dmDriverExtra = 0;
45 
46  SetMode->ddRVal = DDERR_UNSUPPORTEDMODE;
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");
55  SetMode->ddRVal = DDERR_UNSUPPORTEDMODE;
56  }
57  else
58  {
59  DX_STUB_str("OK");
60  SetMode->ddRVal = DD_OK;
61  }
62  }
63 
64  return DDHAL_DRIVER_HANDLED;
65 }
WORD dmSize
Definition: wingdi.h:1563
WORD dmDriverExtra
Definition: wingdi.h:1564
#define CDS_FULLSCREEN
Definition: winuser.h:183
#define DX_STUB_str(x)
Definition: rosdraw.h:254
HRESULT ddRVal
Definition: ddrawi.h:768
#define DDHAL_DRIVER_HANDLED
Definition: ddrawi.h:321
#define DD_OK
Definition: ddraw.h:186
smooth NULL
Definition: ftsmooth.c:416
#define DISP_CHANGE_SUCCESSFUL
Definition: winuser.h:190
unsigned short WORD
Definition: ntddk_ex.h:93
#define DDERR_UNSUPPORTEDMODE
Definition: ddraw.h:164
DWORD dwModeIndex
Definition: ddrawi.h:767

Referenced by StartDirectDrawHel().

◆ HelDdWaitForVerticalBlank()

DWORD CALLBACK HelDdWaitForVerticalBlank ( LPDDHAL_WAITFORVERTICALBLANKDATA  lpWaitForVerticalBlank)

Definition at line 67 of file callbacks_dd_hel.c.

68 {
69  DX_STUB;
70 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

Variable Documentation

◆ pixelformats

DDPIXELFORMAT pixelformats[]

Referenced by test_decoder_info().

◆ pixelformatsCount

DWORD pixelformatsCount