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
88812843
Commit
88812843
authored
Jun 28, 2005
by
Robert Reif
Committed by
Alexandre Julliard
Jun 28, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Add an audio configure button with code to display the selected
audio driver's configure dialog. - Add an audio control panel launch button.
parent
44bc9f7a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
1 deletion
+59
-1
En.rc
programs/winecfg/En.rc
+2
-0
Makefile.in
programs/winecfg/Makefile.in
+1
-1
audio.c
programs/winecfg/audio.c
+54
-0
resource.h
programs/winecfg/resource.h
+2
-0
No files found.
programs/winecfg/En.rc
View file @
88812843
...
...
@@ -139,6 +139,8 @@ BEGIN
LTEXT "Audio driver: ",IDC_STATIC,10,20,60,8
COMBOBOX IDC_AUDIO_DRIVER,70,18,85,85,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Autodetect",IDC_AUDIO_AUTODETECT,170,20,49,14
PUSHBUTTON "Configure",IDC_AUDIO_CONFIGURE,170,40,49,14
PUSHBUTTON "Control Panel",IDC_AUDIO_CONTROL_PANEL,170,60,49,14
END
STRINGTABLE DISCARDABLE
...
...
programs/winecfg/Makefile.in
View file @
88812843
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
winecfg.exe
APPMODE
=
-mwindows
IMPORTS
=
comdlg32 comctl32 shell32 ole32 shlwapi user32 advapi32 kernel32
IMPORTS
=
comdlg32 comctl32 shell32 ole32
winmm
shlwapi user32 advapi32 kernel32
C_SRCS
=
\
appdefaults.c
\
...
...
programs/winecfg/audio.c
View file @
88812843
...
...
@@ -37,6 +37,7 @@
#include <shlguid.h>
#include <shlwapi.h>
#include <shlobj.h>
#include <mmsystem.h>
#include "winecfg.h"
#include "resource.h"
...
...
@@ -64,6 +65,49 @@ static void selectAudioDriver(HWND hDlg, const char *drivername)
}
}
static
void
configureAudioDriver
(
HWND
hDlg
,
const
char
*
drivername
)
{
int
i
;
const
AUDIO_DRIVER
*
pAudioDrv
=
NULL
;
if
((
pAudioDrv
=
getAudioDrivers
()))
{
for
(
i
=
0
;
*
pAudioDrv
->
szName
;
i
++
,
pAudioDrv
++
)
{
if
(
!
strcmp
(
pAudioDrv
->
szDriver
,
drivername
))
{
if
(
strlen
(
pAudioDrv
->
szDriver
)
!=
0
)
{
HDRVR
hdrvr
;
char
wine_driver
[
MAX_NAME_LENGTH
+
8
];
sprintf
(
wine_driver
,
"wine%s.drv"
,
pAudioDrv
->
szDriver
);
hdrvr
=
OpenDriverA
(
wine_driver
,
0
,
0
);
if
(
hdrvr
!=
0
)
{
if
(
SendDriverMessage
(
hdrvr
,
DRV_QUERYCONFIGURE
,
0
,
0
)
!=
0
)
{
DRVCONFIGINFO
dci
;
LONG
lRes
;
dci
.
dwDCISize
=
sizeof
(
dci
);
dci
.
lpszDCISectionName
=
(
LPWSTR
)
0
;
dci
.
lpszDCIAliasName
=
(
LPWSTR
)
0
;
lRes
=
SendDriverMessage
(
hdrvr
,
DRV_CONFIGURE
,
0
,
(
LONG
)
&
dci
);
}
CloseDriver
(
hdrvr
,
0
,
0
);
}
else
{
char
str
[
1024
];
sprintf
(
str
,
"Couldn't open %s!"
,
wine_driver
);
MessageBox
(
NULL
,
str
,
"Fixme"
,
MB_OK
|
MB_ICONERROR
);
}
}
break
;
}
}
}
}
static
void
initAudioDlg
(
HWND
hDlg
)
{
char
*
curAudioDriver
=
get_reg_key
(
config_key
,
"Drivers"
,
"Audio"
,
"alsa"
);
...
...
@@ -172,6 +216,16 @@ AudioDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
selectAudioDriver
(
hDlg
,
(
char
*
)
pAudioDrv
[
selected_driver
].
szDriver
);
}
break
;
case
IDC_AUDIO_CONFIGURE
:
{
const
AUDIO_DRIVER
*
pAudioDrv
=
getAudioDrivers
();
int
selected_driver
=
SendDlgItemMessage
(
hDlg
,
IDC_AUDIO_DRIVER
,
CB_GETCURSEL
,
0
,
0
);
configureAudioDriver
(
hDlg
,
(
char
*
)
pAudioDrv
[
selected_driver
].
szDriver
);
}
break
;
case
IDC_AUDIO_CONTROL_PANEL
:
MessageBox
(
NULL
,
"Launching audio control panel not implemented yet!"
,
"Fixme"
,
MB_OK
|
MB_ICONERROR
);
break
;
}
break
;
...
...
programs/winecfg/resource.h
View file @
88812843
...
...
@@ -123,3 +123,5 @@
/* audio tab */
#define IDC_AUDIO_AUTODETECT 1300
#define IDC_AUDIO_DRIVER 1301
#define IDC_AUDIO_CONFIGURE 1302
#define IDC_AUDIO_CONTROL_PANEL 1303
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