ReactOS  0.4.14-dev-317-g96040ec
dispmode.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS 'Layers' Shim library
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: Display settings related shims
5  * COPYRIGHT: Copyright 2016,2017 Mark Jansen (mark.jansen@reactos.org)
6  */
7 
8 #define WIN32_NO_STATUS
9 #include <windef.h>
10 #include <winbase.h>
11 #include <wingdi.h>
12 #include <winuser.h>
13 #include <shimlib.h>
14 
15 
16 #define SHIM_NS Force8BitColor
17 #include <setup_shim.inl>
18 
19 #define SHIM_NUM_HOOKS 0
20 #define SHIM_NOTIFY_FN SHIM_OBJ_NAME(Notify)
21 
22 BOOL WINAPI SHIM_OBJ_NAME(Notify)(DWORD fdwReason, PVOID ptr)
23 {
24  if (fdwReason == SHIM_REASON_INIT)
25  {
26  DEVMODEA dm = { { 0 } };
27  dm.dmSize = sizeof(dm);
29  dm.dmBitsPerPel != 8)
30  {
31  dm.dmBitsPerPel = 8;
32  dm.dmFields |= DM_BITSPERPEL;
34  }
35  }
36  return TRUE;
37 }
38 
39 #include <implement_shim.inl>
40 
41 
42 
43 #define SHIM_NS Force640x480
44 #include <setup_shim.inl>
45 
46 #define SHIM_NUM_HOOKS 0
47 #define SHIM_NOTIFY_FN SHIM_OBJ_NAME(Notify)
48 
49 BOOL WINAPI SHIM_OBJ_NAME(Notify)(DWORD fdwReason, PVOID ptr)
50 {
51  if (fdwReason == SHIM_REASON_INIT)
52  {
53  DEVMODEA dm = { { 0 } };
54  dm.dmSize = sizeof(dm);
56  (dm.dmPelsWidth != 640 || dm.dmPelsHeight != 480))
57  {
58  dm.dmPelsWidth = 640;
59  dm.dmPelsHeight = 480;
62  }
63  }
64  return TRUE;
65 }
66 
67 #include <implement_shim.inl>
68 
69 
BOOL WINAPI SHIM_OBJ_NAME() Notify(DWORD fdwReason, PVOID ptr)
Definition: dispmode.c:22
#define TRUE
Definition: types.h:120
WORD dmSize
Definition: wingdi.h:1563
#define CDS_FULLSCREEN
Definition: winuser.h:183
#define ENUM_CURRENT_SETTINGS
Definition: winuser.h:179
#define DM_PELSWIDTH
Definition: wingdi.h:1268
unsigned int BOOL
Definition: ntddk_ex.h:94
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
#define SHIM_REASON_INIT
Definition: shimlib.h:45
BOOL WINAPI EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEA lpDevMode)
Definition: display.c:312
#define WINAPI
Definition: msvc.h:8
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD dmPelsHeight
Definition: wingdi.h:1592
DWORD dmFields
Definition: wingdi.h:1565
DWORD dmBitsPerPel
Definition: wingdi.h:1590
#define DM_PELSHEIGHT
Definition: wingdi.h:1269
LONG WINAPI ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwflags)
Definition: display.c:570
#define DM_BITSPERPEL
Definition: wingdi.h:1267
DWORD dmPelsWidth
Definition: wingdi.h:1591