ReactOS 0.4.15-dev-7717-g4dc4ec2
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
22BOOL 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;
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
49BOOL 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
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
BOOL WINAPI SHIM_OBJ_NAME() Notify(DWORD fdwReason, PVOID ptr)
Definition: dispmode.c:22
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
static PVOID ptr
Definition: dispmode.c:27
#define SHIM_REASON_INIT
Definition: shimlib.h:45
DWORD dmFields
Definition: wingdi.h:1570
DWORD dmPelsWidth
Definition: wingdi.h:1596
DWORD dmPelsHeight
Definition: wingdi.h:1597
DWORD dmBitsPerPel
Definition: wingdi.h:1595
WORD dmSize
Definition: wingdi.h:1568
BOOL WINAPI EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEA lpDevMode)
Definition: display.c:312
LONG WINAPI ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwflags)
Definition: display.c:570
#define WINAPI
Definition: msvc.h:6
#define DM_PELSWIDTH
Definition: wingdi.h:1269
#define DM_BITSPERPEL
Definition: wingdi.h:1268
#define DM_PELSHEIGHT
Definition: wingdi.h:1270
#define CDS_FULLSCREEN
Definition: winuser.h:183
#define ENUM_CURRENT_SETTINGS
Definition: winuser.h:179