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
e5bd1ba4
Commit
e5bd1ba4
authored
Aug 27, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conhost: Implement IOCTL_CONDRV_GET_MODE.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
eb293d76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
console.c
dlls/kernel32/tests/console.c
+6
-2
conhost.c
programs/conhost/conhost.c
+12
-0
No files found.
dlls/kernel32/tests/console.c
View file @
e5bd1ba4
...
@@ -3945,7 +3945,7 @@ static void test_AllocConsole(void)
...
@@ -3945,7 +3945,7 @@ static void test_AllocConsole(void)
CloseHandle
(
pipe_write
);
CloseHandle
(
pipe_write
);
}
}
static
void
test_pseudo_console_child
(
HANDLE
input
)
static
void
test_pseudo_console_child
(
HANDLE
input
,
HANDLE
output
)
{
{
DWORD
mode
;
DWORD
mode
;
BOOL
ret
;
BOOL
ret
;
...
@@ -3967,6 +3967,10 @@ static void test_pseudo_console_child(HANDLE input)
...
@@ -3967,6 +3967,10 @@ static void test_pseudo_console_child(HANDLE input)
ret
=
SetConsoleMode
(
input
,
mode
|
ENABLE_AUTO_POSITION
);
ret
=
SetConsoleMode
(
input
,
mode
|
ENABLE_AUTO_POSITION
);
ok
(
ret
,
"SetConsoleMode failed: %u
\n
"
,
GetLastError
());
ok
(
ret
,
"SetConsoleMode failed: %u
\n
"
,
GetLastError
());
ret
=
GetConsoleMode
(
output
,
&
mode
);
ok
(
ret
,
"GetConsoleMode failed: %u
\n
"
,
GetLastError
());
ok
(
mode
==
(
ENABLE_PROCESSED_OUTPUT
|
ENABLE_WRAP_AT_EOL_OUTPUT
),
"mode = %x
\n
"
,
mode
);
test_console_title
();
test_console_title
();
test_WriteConsoleInputW
(
input
);
test_WriteConsoleInputW
(
input
);
}
}
...
@@ -4144,7 +4148,7 @@ START_TEST(console)
...
@@ -4144,7 +4148,7 @@ START_TEST(console)
if
(
using_pseudo_console
)
if
(
using_pseudo_console
)
{
{
test_pseudo_console_child
(
hConIn
);
test_pseudo_console_child
(
hConIn
,
hConOut
);
return
;
return
;
}
}
...
...
programs/conhost/conhost.c
View file @
e5bd1ba4
...
@@ -67,6 +67,7 @@ struct screen_buffer
...
@@ -67,6 +67,7 @@ struct screen_buffer
{
{
struct
console
*
console
;
/* console reference */
struct
console
*
console
;
/* console reference */
unsigned
int
id
;
/* screen buffer id */
unsigned
int
id
;
/* screen buffer id */
unsigned
int
mode
;
/* output mode */
unsigned
int
width
;
/* size (w-h) of the screen buffer */
unsigned
int
width
;
/* size (w-h) of the screen buffer */
unsigned
int
height
;
unsigned
int
height
;
struct
wine_rb_entry
entry
;
/* map entry */
struct
wine_rb_entry
entry
;
/* map entry */
...
@@ -102,6 +103,7 @@ static struct screen_buffer *create_screen_buffer( struct console *console, int
...
@@ -102,6 +103,7 @@ static struct screen_buffer *create_screen_buffer( struct console *console, int
if
(
!
(
screen_buffer
=
malloc
(
sizeof
(
*
screen_buffer
)
)))
return
NULL
;
if
(
!
(
screen_buffer
=
malloc
(
sizeof
(
*
screen_buffer
)
)))
return
NULL
;
screen_buffer
->
console
=
console
;
screen_buffer
->
console
=
console
;
screen_buffer
->
id
=
id
;
screen_buffer
->
id
=
id
;
screen_buffer
->
mode
=
ENABLE_PROCESSED_OUTPUT
|
ENABLE_WRAP_AT_EOL_OUTPUT
;
screen_buffer
->
width
=
width
;
screen_buffer
->
width
=
width
;
screen_buffer
->
height
=
height
;
screen_buffer
->
height
=
height
;
...
@@ -232,6 +234,16 @@ static NTSTATUS screen_buffer_ioctl( struct screen_buffer *screen_buffer, unsign
...
@@ -232,6 +234,16 @@ static NTSTATUS screen_buffer_ioctl( struct screen_buffer *screen_buffer, unsign
screen_buffer
->
console
->
active
=
screen_buffer
;
screen_buffer
->
console
->
active
=
screen_buffer
;
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
case
IOCTL_CONDRV_GET_MODE
:
{
DWORD
*
mode
;
TRACE
(
"returning mode %x
\n
"
,
screen_buffer
->
mode
);
if
(
in_size
||
*
out_size
!=
sizeof
(
*
mode
))
return
STATUS_INVALID_PARAMETER
;
if
(
!
(
mode
=
alloc_ioctl_buffer
(
*
out_size
)))
return
STATUS_NO_MEMORY
;
*
mode
=
screen_buffer
->
mode
;
return
STATUS_SUCCESS
;
}
default:
default:
FIXME
(
"unsupported ioctl %x
\n
"
,
code
);
FIXME
(
"unsupported ioctl %x
\n
"
,
code
);
return
STATUS_NOT_SUPPORTED
;
return
STATUS_NOT_SUPPORTED
;
...
...
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