ReactOS
0.4.16-dev-927-g467dec4
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
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);
28
if
(
EnumDisplaySettingsA
(
NULL
,
ENUM_CURRENT_SETTINGS
, &dm) &&
29
dm.
dmBitsPerPel
!= 8)
30
{
31
dm.
dmBitsPerPel
= 8;
32
dm.
dmFields
|=
DM_BITSPERPEL
;
33
ChangeDisplaySettingsA
(&dm,
CDS_FULLSCREEN
);
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);
55
if
(
EnumDisplaySettingsA
(
NULL
,
ENUM_CURRENT_SETTINGS
, &dm) &&
56
(dm.
dmPelsWidth
!= 640 || dm.
dmPelsHeight
!= 480))
57
{
58
dm.
dmPelsWidth
= 640;
59
dm.
dmPelsHeight
= 480;
60
dm.
dmFields
|= (
DM_PELSWIDTH
|
DM_PELSHEIGHT
);
61
ChangeDisplaySettingsA
(&dm,
CDS_FULLSCREEN
);
62
}
63
}
64
return
TRUE
;
65
}
66
67
#include <implement_shim.inl>
68
69
fdwReason
static DWORD const fdwReason
Definition:
appcrt_dllmain.cpp:57
NULL
#define NULL
Definition:
types.h:112
TRUE
#define TRUE
Definition:
types.h:120
Notify
BOOL WINAPI SHIM_OBJ_NAME() Notify(DWORD fdwReason, PVOID ptr)
Definition:
dispmode.c:22
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
void
Definition:
nsiface.idl:2307
ptr
static PVOID ptr
Definition:
dispmode.c:27
shimlib.h
SHIM_REASON_INIT
#define SHIM_REASON_INIT
Definition:
shimlib.h:45
_devicemodeA
Definition:
wingdi.h:1564
_devicemodeA::dmFields
DWORD dmFields
Definition:
wingdi.h:1570
_devicemodeA::dmPelsWidth
DWORD dmPelsWidth
Definition:
wingdi.h:1596
_devicemodeA::dmPelsHeight
DWORD dmPelsHeight
Definition:
wingdi.h:1597
_devicemodeA::dmBitsPerPel
DWORD dmBitsPerPel
Definition:
wingdi.h:1595
_devicemodeA::dmSize
WORD dmSize
Definition:
wingdi.h:1568
EnumDisplaySettingsA
BOOL WINAPI EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEA lpDevMode)
Definition:
display.c:312
ChangeDisplaySettingsA
LONG WINAPI ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwflags)
Definition:
display.c:570
winbase.h
windef.h
WINAPI
#define WINAPI
Definition:
msvc.h:6
wingdi.h
DM_PELSWIDTH
#define DM_PELSWIDTH
Definition:
wingdi.h:1269
DM_BITSPERPEL
#define DM_BITSPERPEL
Definition:
wingdi.h:1268
DM_PELSHEIGHT
#define DM_PELSHEIGHT
Definition:
wingdi.h:1270
winuser.h
CDS_FULLSCREEN
#define CDS_FULLSCREEN
Definition:
winuser.h:183
ENUM_CURRENT_SETTINGS
#define ENUM_CURRENT_SETTINGS
Definition:
winuser.h:179
dll
appcompat
shims
layer
dispmode.c
Generated on Sun Mar 30 2025 06:06:55 for ReactOS by
1.9.6