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
f24a5bc8
Commit
f24a5bc8
authored
Dec 11, 2013
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Dec 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
krnl386.exe16: Make VGA_[Set/Get]Mode return TRUE on success.
parent
955de31f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
int10.c
dlls/krnl386.exe16/int10.c
+1
-1
int33.c
dlls/krnl386.exe16/int33.c
+1
-1
vga.c
dlls/krnl386.exe16/vga.c
+10
-10
vga.h
dlls/krnl386.exe16/vga.h
+2
-2
No files found.
dlls/krnl386.exe16/int10.c
View file @
f24a5bc8
...
...
@@ -750,7 +750,7 @@ static BOOL INT10_SetVideoMode( BIOSDATA *data, WORD mode )
ptr
->
Width
,
ptr
->
Height
,
ptr
->
Depth
,
clearScreen
?
"cleared"
:
"preserved"
);
if
(
VGA_SetMode
(
mode
)
)
if
(
!
VGA_SetMode
(
mode
)
)
return
FALSE
;
}
...
...
dlls/krnl386.exe16/int33.c
View file @
f24a5bc8
...
...
@@ -295,7 +295,7 @@ void DOSVM_Int33Message(UINT message,WPARAM wParam,LPARAM lParam)
WORD
mask
=
0
;
unsigned
Height
,
Width
,
SX
=
1
,
SY
=
1
;
if
(
!
VGA_GetMode
(
&
Height
,
&
Width
,
NULL
))
{
if
(
VGA_GetMode
(
&
Height
,
&
Width
,
NULL
))
{
/* may need to do some coordinate scaling */
if
(
Width
)
SX
=
640
/
Width
;
...
...
dlls/krnl386.exe16/vga.c
View file @
f24a5bc8
...
...
@@ -735,7 +735,7 @@ static char*VGA_AlphaBuffer(void)
typedef
struct
{
unsigned
Xres
,
Yres
,
Depth
;
int
ret
;
BOOL
ret
;
}
ModeSet
;
...
...
@@ -780,7 +780,7 @@ static void WINAPI VGA_DoSetMode(ULONG_PTR arg)
{
HRESULT
res
;
ModeSet
*
par
=
(
ModeSet
*
)
arg
;
par
->
ret
=
1
;
par
->
ret
=
FALSE
;
if
(
lpddraw
)
VGA_DoExit
(
0
);
if
(
!
lpddraw
)
{
...
...
@@ -845,7 +845,7 @@ static void WINAPI VGA_DoSetMode(ULONG_PTR arg)
/* poll every 20ms (50fps should provide adequate responsiveness) */
VGA_InstallTimer
(
20
);
}
par
->
ret
=
0
;
par
->
ret
=
TRUE
;
return
;
}
...
...
@@ -872,7 +872,7 @@ const VGA_MODE *VGA_GetModeInfo(WORD mode)
return
NULL
;
}
static
int
VGA_SetGraphicMode
(
WORD
mode
)
static
BOOL
VGA_SetGraphicMode
(
WORD
mode
)
{
ModeSet
par
;
int
newSize
;
...
...
@@ -954,7 +954,7 @@ static int VGA_SetGraphicMode(WORD mode)
return
par
.
ret
;
}
int
VGA_SetMode
(
WORD
mode
)
BOOL
VGA_SetMode
(
WORD
mode
)
{
const
VGA_MODE
*
ModeInfo
;
/* get info on VGA mode & set appropriately */
...
...
@@ -980,17 +980,17 @@ int VGA_SetMode(WORD mode)
{
return
VGA_SetGraphicMode
(
mode
);
}
return
0
;
/* assume all good & return zero
*/
return
TRUE
;
/* assume all good & return TRUE
*/
}
int
VGA_GetMode
(
unsigned
*
Height
,
unsigned
*
Width
,
unsigned
*
Depth
)
BOOL
VGA_GetMode
(
unsigned
*
Height
,
unsigned
*
Width
,
unsigned
*
Depth
)
{
if
(
!
lpddraw
)
return
1
;
if
(
!
lpddsurf
)
return
1
;
if
(
!
lpddraw
)
return
FALSE
;
if
(
!
lpddsurf
)
return
FALSE
;
if
(
Height
)
*
Height
=
sdesc
.
dwHeight
;
if
(
Width
)
*
Width
=
sdesc
.
dwWidth
;
if
(
Depth
)
*
Depth
=
sdesc
.
ddpfPixelFormat
.
u1
.
dwRGBBitCount
;
return
0
;
return
TRUE
;
}
static
void
VGA_Exit
(
void
)
...
...
dlls/krnl386.exe16/vga.h
View file @
f24a5bc8
...
...
@@ -52,10 +52,10 @@ extern const VGA_MODE VGA_modelist[];
/* all vga modes */
const
VGA_MODE
*
VGA_GetModeInfo
(
WORD
mode
);
int
VGA_SetMode
(
WORD
mode
);
BOOL
VGA_SetMode
(
WORD
mode
);
/* graphics mode */
int
VGA_GetMode
(
unsigned
*
Height
,
unsigned
*
Width
,
unsigned
*
Depth
);
BOOL
VGA_GetMode
(
unsigned
*
Height
,
unsigned
*
Width
,
unsigned
*
Depth
);
void
VGA_SetPalette
(
PALETTEENTRY
*
pal
,
int
start
,
int
len
);
void
VGA_SetColor16
(
int
reg
,
int
color
);
char
VGA_GetColor16
(
int
reg
);
...
...
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