Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
fc37ef61
Commit
fc37ef61
authored
May 17, 2002
by
Christian Costa
Committed by
Alexandre Julliard
May 17, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not create a window each time VGA_DoSetMode is called. The window
is created the first time and then just resized.
parent
bf90f4db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
vga.c
dlls/winedos/vga.c
+15
-6
No files found.
dlls/winedos/vga.c
View file @
fc37ef61
...
...
@@ -52,6 +52,8 @@ static DirectDrawCreateProc pDirectDrawCreate;
static
void
CALLBACK
VGA_Poll
(
LPVOID
arg
,
DWORD
low
,
DWORD
high
);
static
HWND
vga_hwnd
=
(
HWND
)
NULL
;
/*
* For simplicity, I'm creating a second palette.
* 16 color accesses will use these pointers and insert
...
...
@@ -247,7 +249,6 @@ static void WINAPI VGA_DoExit(ULONG_PTR arg)
static
void
WINAPI
VGA_DoSetMode
(
ULONG_PTR
arg
)
{
LRESULT
res
;
HWND
hwnd
;
ModeSet
*
par
=
(
ModeSet
*
)
arg
;
par
->
ret
=
1
;
...
...
@@ -267,11 +268,19 @@ static void WINAPI VGA_DoSetMode(ULONG_PTR arg)
ERR
(
"DirectDraw is not available (res = %lx)
\n
"
,
res
);
return
;
}
hwnd
=
CreateWindowExA
(
0
,
"STATIC"
,
"WINEDOS VGA"
,
WS_POPUP
|
WS_BORDER
|
WS_CAPTION
|
WS_SYSMENU
,
0
,
0
,
par
->
Xres
,
par
->
Yres
,
0
,
0
,
0
,
NULL
);
if
(
!
hwnd
)
{
ERR
(
"Failed to create user window.
\n
"
);
}
if
((
res
=
IDirectDraw_SetCooperativeLevel
(
lpddraw
,
hwnd
,
DDSCL_FULLSCREEN
|
DDSCL_EXCLUSIVE
)))
{
if
(
!
vga_hwnd
)
{
vga_hwnd
=
CreateWindowExA
(
0
,
"STATIC"
,
"WINEDOS VGA"
,
WS_POPUP
|
WS_BORDER
|
WS_CAPTION
|
WS_SYSMENU
,
0
,
0
,
par
->
Xres
,
par
->
Yres
,
0
,
0
,
0
,
NULL
);
if
(
!
vga_hwnd
)
{
ERR
(
"Failed to create user window.
\n
"
);
IDirectDraw_Release
(
lpddraw
);
lpddraw
=
NULL
;
return
;
}
}
else
SetWindowPos
(
vga_hwnd
,
0
,
0
,
0
,
par
->
Xres
,
par
->
Yres
,
SWP_NOMOVE
|
SWP_NOZORDER
);
if
((
res
=
IDirectDraw_SetCooperativeLevel
(
lpddraw
,
vga_hwnd
,
DDSCL_FULLSCREEN
|
DDSCL_EXCLUSIVE
)))
{
ERR
(
"Could not set cooperative level to exclusive (%lx)
\n
"
,
res
);
}
...
...
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