PCem

changeset 117:a6ce8addfffa

Fixed crash when selecting no sound card. Fixed number of heads when creating a new hard disc for drive C.
author TomW
date Tue Jul 08 21:03:34 2014 +0100
parents 4081a8dbce5b
children 07168c9bdd22
files src/sound.c src/win-hdconf.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/src/sound.c	Tue Jul 08 20:35:39 2014 +0100
     1.2 +++ b/src/sound.c	Tue Jul 08 21:03:34 2014 +0100
     1.3 @@ -63,6 +63,8 @@
     1.4  
     1.5  int sound_card_has_config(int card)
     1.6  {
     1.7 +        if (!sound_cards[card].device)
     1.8 +                return 0;
     1.9          return sound_cards[card].device->config ? 1 : 0;
    1.10  }
    1.11  
     2.1 --- a/src/win-hdconf.c	Tue Jul 08 20:35:39 2014 +0100
     2.2 +++ b/src/win-hdconf.c	Tue Jul 08 21:03:34 2014 +0100
     2.3 @@ -331,7 +331,7 @@
     2.4                                  h = GetDlgItem(hdlg, IDC_EDIT_C_SPT);
     2.5                                  sprintf(s, "%i", hd_new_spt);
     2.6                                  SendMessage(h, WM_SETTEXT, 0, (LPARAM)s);
     2.7 -                                h = GetDlgItem(hdlg, IDC_EDIT_C_CYL);
     2.8 +                                h = GetDlgItem(hdlg, IDC_EDIT_C_HPC);
     2.9                                  sprintf(s, "%i", hd_new_hpc);
    2.10                                  SendMessage(h, WM_SETTEXT, 0, (LPARAM)s);
    2.11                                  h = GetDlgItem(hdlg, IDC_EDIT_C_CYL);