win32 USER_SOUNDS
This uses pmatch() as a default pattern matcher, and #defines USER_SOUNDS_REGEX for Qt to enable the code for regular expressions. This is enabled for win32tty and win32gui.
This commit is contained in:
@@ -1761,6 +1761,9 @@ tty_putstr(window, attr, str)
|
||||
switch(cw->type) {
|
||||
case NHW_MESSAGE:
|
||||
/* really do this later */
|
||||
#if defined(USER_SOUNDS) && defined(WIN32CON)
|
||||
play_sound_for_message(str);
|
||||
#endif
|
||||
update_topl(str);
|
||||
break;
|
||||
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
|
||||
#define MORE "--More--"
|
||||
|
||||
|
||||
|
||||
struct window_line {
|
||||
int attr;
|
||||
char text[MAXWINDOWTEXT];
|
||||
@@ -61,6 +59,10 @@ static COLORREF setMsgTextColor(HDC hdc, int gray);
|
||||
static void onPaint(HWND hWnd);
|
||||
static void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
#ifdef USER_SOUNDS
|
||||
extern void play_sound_for_message(const char* str);
|
||||
#endif
|
||||
|
||||
HWND mswin_init_message_window () {
|
||||
static int run_once = 0;
|
||||
HWND ret;
|
||||
@@ -242,6 +244,10 @@ void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
/* update window content */
|
||||
InvalidateRect(hWnd, NULL, TRUE);
|
||||
|
||||
#ifdef USER_SOUNDS
|
||||
play_sound_for_message(msg_data->text);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib comctl32.lib advapi32.lib /nologo /subsystem:windows /map /debug /machine:I386 /MAPINFO:EXPORTS /MAPINFO:LINES
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib comctl32.lib advapi32.lib winmm.lib /nologo /subsystem:windows /map /debug /machine:I386 /MAPINFO:EXPORTS /MAPINFO:LINES
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\Release
|
||||
@@ -95,7 +95,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib comctl32.lib advapi32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib comctl32.lib advapi32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\Debug
|
||||
SOURCE="$(InputPath)"
|
||||
@@ -358,6 +358,10 @@ SOURCE=..\src\music.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\sys\winnt\ntsound.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\o_init.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
Reference in New Issue
Block a user