Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a7dba33c
Commit
a7dba33c
authored
Dec 05, 2007
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Dec 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Use registry settings as a default display mode.
parent
e388a493
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
21 deletions
+14
-21
desktop.c
dlls/winex11.drv/desktop.c
+0
-1
settings.c
dlls/winex11.drv/settings.c
+14
-14
x11drv.h
dlls/winex11.drv/x11drv.h
+0
-1
xrandr.c
dlls/winex11.drv/xrandr.c
+0
-1
xvidmode.c
dlls/winex11.drv/xvidmode.c
+0
-4
No files found.
dlls/winex11.drv/desktop.c
View file @
a7dba33c
...
...
@@ -156,7 +156,6 @@ void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height )
make_modes
();
X11DRV_Settings_AddDepthModes
();
dd_mode_count
=
X11DRV_Settings_GetModeCount
();
X11DRV_Settings_SetDefaultMode
(
0
);
}
...
...
dlls/winex11.drv/settings.c
View file @
a7dba33c
...
...
@@ -44,7 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11settings);
static
LPDDHALMODEINFO
dd_modes
=
NULL
;
static
unsigned
int
dd_mode_count
=
0
;
static
unsigned
int
dd_max_modes
=
0
;
static
int
dd_mode_default
=
0
;
static
const
unsigned
int
depths
[]
=
{
8
,
16
,
32
};
/* pointers to functions that actually do the hard stuff */
...
...
@@ -130,12 +129,6 @@ void X11DRV_Settings_AddDepthModes(void)
}
}
/* set the default mode */
void
X11DRV_Settings_SetDefaultMode
(
int
mode
)
{
dd_mode_default
=
mode
;
}
/* return the number of modes that are initialized */
unsigned
int
X11DRV_Settings_GetModeCount
(
void
)
{
...
...
@@ -377,20 +370,26 @@ LONG X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode,
if
(
devmode
->
dmFields
&
DM_DISPLAYFREQUENCY
)
def_mode
&=
!
devmode
->
dmDisplayFrequency
;
}
if
(
def_mode
)
if
(
def_mode
||
!
dwBpp
)
{
TRACE
(
"Return to original display mode (%s)
\n
"
,
handler_name
);
if
(
!
X11DRV_EnumDisplaySettingsEx
(
devname
,
dd_mode_default
,
&
dm
,
0
))
if
(
!
X11DRV_EnumDisplaySettingsEx
(
devname
,
ENUM_REGISTRY_SETTINGS
,
&
dm
,
0
))
{
ERR
(
"Default mode not found!
\n
"
);
return
DISP_CHANGE_BADMODE
;
}
devmode
=
&
dm
;
if
(
def_mode
)
{
TRACE
(
"Return to original display mode (%s)
\n
"
,
handler_name
);
devmode
=
&
dm
;
}
dwBpp
=
dm
.
dmBitsPerPel
;
}
dwBpp
=
!
dwBpp
?
dd_modes
[
dd_mode_default
].
dwBPP
:
dwBpp
;
if
((
devmode
->
dmFields
&
(
DM_PELSWIDTH
|
DM_PELSHEIGHT
))
!=
(
DM_PELSWIDTH
|
DM_PELSHEIGHT
))
{
WARN
(
"devmode doesn't specify the resolution: %04x
\n
"
,
devmode
->
dmFields
);
return
DISP_CHANGE_BADMODE
;
}
for
(
i
=
0
;
i
<
dd_mode_count
;
i
++
)
{
...
...
@@ -423,13 +422,14 @@ LONG X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode,
if
(
!
(
flags
&
(
CDS_TEST
|
CDS_NORESET
)))
return
pSetCurrentMode
(
i
);
return
DISP_CHANGE_SUCCESSFUL
;
}
/* no valid modes found */
ERR
(
"No matching mode found
(%dx%dx%d)
! (%s)
\n
"
,
ERR
(
"No matching mode found
%ux%ux%u @%u
! (%s)
\n
"
,
devmode
->
dmPelsWidth
,
devmode
->
dmPelsHeight
,
devmode
->
dmBitsPerPel
,
handler_name
);
devmode
->
dmBitsPerPel
,
devmode
->
dmDisplayFrequency
,
handler_name
);
return
DISP_CHANGE_BADMODE
;
}
...
...
dlls/winex11.drv/x11drv.h
View file @
a7dba33c
...
...
@@ -739,7 +739,6 @@ extern int X11DRV_Settings_CreateDriver(LPDDHALINFO info);
extern
LPDDHALMODEINFO
X11DRV_Settings_CreateModes
(
unsigned
int
max_modes
,
int
reserve_depths
);
unsigned
int
X11DRV_Settings_GetModeCount
(
void
);
void
X11DRV_Settings_Init
(
void
);
extern
void
X11DRV_Settings_SetDefaultMode
(
int
mode
);
LPDDHALMODEINFO
X11DRV_Settings_SetHandlers
(
const
char
*
name
,
int
(
*
pNewGCM
)(
void
),
LONG
(
*
pNewSCM
)(
int
),
...
...
dlls/winex11.drv/xrandr.c
View file @
a7dba33c
...
...
@@ -304,7 +304,6 @@ void X11DRV_XRandR_Init(void)
make_modes
();
X11DRV_Settings_AddDepthModes
();
dd_mode_count
=
X11DRV_Settings_GetModeCount
();
X11DRV_Settings_SetDefaultMode
(
0
);
TRACE
(
"Available DD modes: count=%d
\n
"
,
dd_mode_count
);
TRACE
(
"Enabling XRandR
\n
"
);
...
...
dlls/winex11.drv/xvidmode.c
View file @
a7dba33c
...
...
@@ -197,10 +197,6 @@ void X11DRV_XF86VM_Init(void)
dd_mode_count
=
X11DRV_Settings_GetModeCount
();
TRACE
(
"Available DD modes: count=%d
\n
"
,
dd_mode_count
);
/* the first mode in the list seems to be the default */
X11DRV_Settings_SetDefaultMode
(
0
);
TRACE
(
"Enabling XVidMode
\n
"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment