/*
* woptions.c -- Options dialog box routines for WinBoard
- * $Id: woptions.c,v 2.1 2003/10/27 19:21:02 mann Exp $
*
* Copyright 2000,2009 Free Software Foundation, Inc.
*
+ * Enhancements Copyright 2005 Alessandro Scotti
+ *
* ------------------------------------------------------------------------
*
* GNU XBoard is free software: you can redistribute it and/or modify
SoundClass sc;
ColorClass cc;
SoundComboData *scd;
+ int oldMute;
switch (message) {
case WM_INITDIALOG:
}
}
+ mute = FALSE; // [HGM] mute: switch sounds automatically on if we select one
+ CheckMenuItem(GetMenu(hwndMain),IDM_MuteSounds,MF_BYCOMMAND|MF_UNCHECKED);
ResetSoundComboData(soundComboData);
EndDialog(hDlg, TRUE);
return TRUE;
tmp.name = strdup(SoundDialogGetName(hDlg, radio));
tmp.data = NULL;
MyLoadSound(&tmp);
+ oldMute = mute; mute = FALSE; // [HGM] mute: always sound when user presses play, ignorig mute setting
MyPlaySound(&tmp);
+ mute = oldMute;
if (tmp.data != NULL) FreeResource(tmp.data); // technically obsolete fn, but tmp.data is NOT malloc'd mem
if (tmp.name != NULL) free(tmp.name);
return TRUE;