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
810873eb
Commit
810873eb
authored
Sep 22, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Move Beep implementation to conhost.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cd9f96c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
14 deletions
+13
-14
console.c
dlls/kernel32/console.c
+3
-14
condrv.h
include/wine/condrv.h
+1
-0
conhost.c
programs/conhost/conhost.c
+9
-0
No files found.
dlls/kernel32/console.c
View file @
810873eb
...
...
@@ -23,21 +23,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* Reference applications:
* - IDA (interactive disassembler) full version 3.75. Works.
* - LYNX/W32. Works mostly, some keys crash it.
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#define NONAMELESSUNION
#include "ntstatus.h"
...
...
@@ -84,9 +73,9 @@ HWND WINAPI GetConsoleWindow(void)
*/
BOOL
WINAPI
Beep
(
DWORD
dwFreq
,
DWORD
dwDur
)
{
static
const
char
beep
=
'\a'
;
/* dwFreq and dwDur are ignored by Win95 */
if
(
isatty
(
2
))
write
(
2
,
&
beep
,
1
);
/* FIXME: we should not require a console to be attached */
DeviceIoControl
(
RtlGetCurrentPeb
()
->
ProcessParameters
->
ConsoleHandle
,
IOCTL_CONDRV_BEEP
,
NULL
,
0
,
NULL
,
0
,
NULL
,
NULL
);
return
TRUE
;
}
...
...
include/wine/condrv.h
View file @
810873eb
...
...
@@ -38,6 +38,7 @@
#define IOCTL_CONDRV_GET_TITLE CTL_CODE(FILE_DEVICE_CONSOLE, 16, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_CONDRV_SET_TITLE CTL_CODE(FILE_DEVICE_CONSOLE, 17, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_CONDRV_CTRL_EVENT CTL_CODE(FILE_DEVICE_CONSOLE, 18, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_CONDRV_BEEP CTL_CODE(FILE_DEVICE_CONSOLE, 19, METHOD_BUFFERED, FILE_ANY_ACCESS)
/* console output ioctls */
#define IOCTL_CONDRV_WRITE_CONSOLE CTL_CODE(FILE_DEVICE_CONSOLE, 30, METHOD_BUFFERED, FILE_WRITE_ACCESS)
...
...
programs/conhost/conhost.c
View file @
810873eb
...
...
@@ -2569,6 +2569,15 @@ static NTSTATUS console_input_ioctl( struct console *console, unsigned int code,
if
(
in_size
%
sizeof
(
WCHAR
)
||
*
out_size
)
return
STATUS_INVALID_PARAMETER
;
return
set_console_title
(
console
,
in_data
,
in_size
);
case
IOCTL_CONDRV_BEEP
:
if
(
in_size
||
*
out_size
)
return
STATUS_INVALID_PARAMETER
;
if
(
console
->
is_unix
)
{
tty_write
(
console
,
"
\a
"
,
1
);
tty_sync
(
console
);
}
return
STATUS_SUCCESS
;
default:
FIXME
(
"unsupported ioctl %x
\n
"
,
code
);
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