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
66267bd8
Commit
66267bd8
authored
Dec 14, 1998
by
Stephen Crowley
Committed by
Alexandre Julliard
Dec 14, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save the original video mode before going fullscreen and restore it
when the last DirectDraw_Release is called. Also fix a problem where the viewport wasn't set to 0,0.
parent
251b8ee6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
3 deletions
+34
-3
ddraw.c
graphics/ddraw.c
+34
-3
No files found.
graphics/ddraw.c
View file @
66267bd8
...
...
@@ -92,6 +92,10 @@ static struct IDirectDrawPalette_VTable dga_ddpalvt, xlib_ddpalvt;
static
struct
IDirect3D_VTable
d3dvt
;
static
struct
IDirect3D2_VTable
d3d2vt
;
#ifdef HAVE_LIBXXF86VM
static
XF86VidModeModeInfo
*
orig_mode
=
NULL
;
#endif
BOOL32
DDRAW_DGA_Available
()
{
...
...
@@ -1996,9 +2000,23 @@ static HRESULT WINAPI DGA_IDirectDraw_SetDisplayMode(
#ifdef HAVE_LIBXXF86VM
{
XF86VidModeModeInfo
**
all_modes
,
*
vidmode
=
NULL
;
/* set fullscreen mode */
/* do we need to save the old video mode and restore it when we exit? */
XF86VidModeModeLine
mod_tmp
;
int
dotclock_tmp
;
/* save original video mode and set fullscreen if available*/
orig_mode
=
(
XF86VidModeModeInfo
*
)
malloc
(
sizeof
(
XF86VidModeModeInfo
));
TSXF86VidModeGetModeLine
(
display
,
DefaultScreen
(
display
),
&
orig_mode
->
dotclock
,
&
mod_tmp
);
orig_mode
->
hdisplay
=
mod_tmp
.
hdisplay
;
orig_mode
->
hsyncstart
=
mod_tmp
.
hsyncstart
;
orig_mode
->
hsyncend
=
mod_tmp
.
hsyncend
;
orig_mode
->
htotal
=
mod_tmp
.
htotal
;
orig_mode
->
vdisplay
=
mod_tmp
.
vdisplay
;
orig_mode
->
vsyncstart
=
mod_tmp
.
vsyncstart
;
orig_mode
->
vsyncend
=
mod_tmp
.
vsyncend
;
orig_mode
->
vtotal
=
mod_tmp
.
vtotal
;
orig_mode
->
flags
=
mod_tmp
.
flags
;
orig_mode
->
private
=
mod_tmp
.
private
;
TSXF86VidModeGetAllModeLines
(
display
,
DefaultScreen
(
display
),
&
mode_count
,
&
all_modes
);
for
(
i
=
0
;
i
<
mode_count
;
i
++
)
{
...
...
@@ -2016,7 +2034,10 @@ static HRESULT WINAPI DGA_IDirectDraw_SetDisplayMode(
WARN
(
ddraw
,
"Fullscreen mode not available!
\n
"
);
if
(
vidmode
)
{
TSXF86VidModeSwitchToMode
(
display
,
DefaultScreen
(
display
),
vidmode
);
TSXF86VidModeSetViewPort
(
display
,
DefaultScreen
(
display
),
0
,
0
);
}
}
#endif
...
...
@@ -2205,6 +2226,16 @@ static ULONG WINAPI DGA_IDirectDraw2_Release(LPDIRECTDRAW2 this) {
#ifdef HAVE_LIBXXF86DGA
if
(
!--
(
this
->
ref
))
{
TSXF86DGADirectVideo
(
display
,
DefaultScreen
(
display
),
0
);
#ifdef HAVE_LIBXXF86VM
if
(
orig_mode
)
TSXF86VidModeSwitchToMode
(
display
,
DefaultScreen
(
display
),
orig_mode
);
if
(
orig_mode
->
privsize
)
TSXFree
(
orig_mode
->
private
);
free
(
orig_mode
);
orig_mode
=
NULL
;
#endif
#ifdef RESTORE_SIGNALS
SIGNAL_InitEmulator
();
#endif
...
...
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