Diff for /np2/win9xc/dialog/d_sound.cpp between versions 1.5 and 1.7

version 1.5, 2004/03/31 14:02:51 version 1.7, 2011/02/15 00:51:51
Line 19 Line 19
 #include        "dipswbmp.h"  #include        "dipswbmp.h"
   
   
 static const char *sndioport[4] = {"0088", "0188", "0288", "0388"};  static const TCHAR *sndioport[4] = {_T("0088"), _T("0188"),
 static const char *sndinterrupt[4] = {str_int0, str_int4, str_int5, str_int6};                                                                          _T("0288"), _T("0388")};
 static const char *sndromaddr[5] = {"C8000", "CC000", "D0000", "D4000", "N/C"};  static const TCHAR *sndinterrupt[4] =
 static const char *sndid[8] = {"0x", "1x", "2x", "3x", "4x", "5x", "6x", "7x"};                                                                  {str_int0, str_int4, str_int5, str_int6};
   static const TCHAR *sndromaddr[5] =
                                                                   {_T("C8000"), _T("CC000"), _T("D0000"),
                                                                           _T("D4000"), _T("N/C")};
   static const TCHAR *sndid[8] = {_T("0x"), _T("1x"), _T("2x"), _T("3x"),
                                                                   _T("4x"), _T("5x"), _T("6x"), _T("7x")};
   
 static const char str_sndopt[] = "Sound board option";  static const TCHAR str_sndopt[] = _T("Sound board option");
   
   
 typedef struct {  typedef struct {
         UINT16  res;          UINT16  res;
         UINT16  resstr;          UINT16  resstr;
         BYTE    *value;          UINT8   *value;
         UINT16  min;          UINT16  min;
         UINT16  max;          UINT16  max;
 } SLIDERTBL;  } SLIDERTBL;
   
 static void slidersetvaluestr(HWND hWnd, const SLIDERTBL *item, BYTE value) {  static void slidersetvaluestr(HWND hWnd, const SLIDERTBL *item, UINT8 value) {
   
         char    work[32];          TCHAR   work[32];
   
         wsprintf(work, str_d, value);          wsprintf(work, str_d, value);
         SetDlgItemText(hWnd, item->resstr, work);          SetDlgItemText(hWnd, item->resstr, work);
 }  }
   
 static void slidersetvalue(HWND hWnd, const SLIDERTBL *item, BYTE value) {  static void slidersetvalue(HWND hWnd, const SLIDERTBL *item, UINT8 value) {
   
         if (value > (BYTE)(item->max)) {          if (value > (UINT8)item->max) {
                 value = (BYTE)(item->max);                  value = (UINT8)item->max;
         }          }
         else if (value < (BYTE)(item->min)) {          else if (value < (UINT8)item->min) {
                 value = (BYTE)(item->min);                  value = (UINT8)item->min;
         }          }
         SendDlgItemMessage(hWnd, item->res, TBM_SETPOS, TRUE, value);          SendDlgItemMessage(hWnd, item->res, TBM_SETPOS, TRUE, value);
         slidersetvaluestr(hWnd, item, value);          slidersetvaluestr(hWnd, item, value);
Line 64  static void sliderinit(HWND hWnd, const  Line 69  static void sliderinit(HWND hWnd, const 
   
 static void sliderresetpos(HWND hWnd, const SLIDERTBL *item) {  static void sliderresetpos(HWND hWnd, const SLIDERTBL *item) {
   
         BYTE    value;          UINT8   value;
   
         value = (BYTE)SendDlgItemMessage(hWnd, item->res, TBM_GETPOS, 0, 0);          value = (UINT8)SendDlgItemMessage(hWnd, item->res, TBM_GETPOS, 0, 0);
         if (value > (BYTE)(item->max)) {          if (value > (UINT8)item->max) {
                 value = (BYTE)(item->max);                  value = (UINT8)item->max;
         }          }
         else if (value < (BYTE)(item->min)) {          else if (value < (UINT8)item->min) {
                 value = (BYTE)(item->min);                  value = (UINT8)item->min;
         }          }
         slidersetvaluestr(hWnd, item, value);          slidersetvaluestr(hWnd, item, value);
 }  }
   
 static BYTE sliderrestore(HWND hWnd, const SLIDERTBL *item) {  static UINT8 sliderrestore(HWND hWnd, const SLIDERTBL *item) {
   
         BYTE    value;          UINT8   value;
         BYTE    ret;          UINT8   ret;
   
         value = (BYTE)SendDlgItemMessage(hWnd, item->res, TBM_GETPOS, 0, 0);          value = (UINT8)SendDlgItemMessage(hWnd, item->res, TBM_GETPOS, 0, 0);
         if (value > (BYTE)(item->max)) {          if (value > (UINT8)item->max) {
                 value = (BYTE)(item->max);                  value = (UINT8)item->max;
         }          }
         else if (value < (BYTE)(item->min)) {          else if (value < (UINT8)item->min) {
                 value = (BYTE)(item->min);                  value = (UINT8)item->min;
         }          }
         ret = (*(item->value)) - value;          ret = (*(item->value)) - value;
         if (ret) {          if (ret) {
Line 118  static LRESULT CALLBACK SndmixDlgProc(HW Line 123  static LRESULT CALLBACK SndmixDlgProc(HW
                         return(TRUE);                          return(TRUE);
   
                 case WM_COMMAND:                  case WM_COMMAND:
                         switch (LOWORD(wp)) {                          switch(LOWORD(wp)) {
                                 case IDC_SNDMIXDEF:                                  case IDC_SNDMIXDEF:
                                         for (i=0; i<5; i++) {                                          for (i=0; i<5; i++) {
                                                 slidersetvalue(hWnd, &sndmixitem[i], 64);                                                  slidersetvalue(hWnd, &sndmixitem[i], 64);
Line 213  static LRESULT CALLBACK Snd14optDlgProc( Line 218  static LRESULT CALLBACK Snd14optDlgProc(
   
 static const UINT snd26paranum[4] = {0, 3, 1, 2};  static const UINT snd26paranum[4] = {0, 3, 1, 2};
   
 static void setsnd26iopara(HWND hWnd, BYTE value) {  static void setsnd26iopara(HWND hWnd, UINT8 value) {
   
         SendMessage(hWnd, CB_SETCURSEL, (WPARAM)((value >> 4) & 1), (LPARAM)0);          SendMessage(hWnd, CB_SETCURSEL, (WPARAM)((value >> 4) & 1), (LPARAM)0);
 }  }
   
 static BYTE getsnd26io(HWND hWnd, WORD res) {  static UINT8 getsnd26io(HWND hWnd, UINT16 res) {
   
         char    work[8];          TCHAR   work[8];
   
         GetDlgItemText(hWnd, res, work, sizeof(work));          GetDlgItemText(hWnd, res, work, NELEMENTS(work));
         return((BYTE)((work[1] == '1')?0x10:0x00));          return((UINT8)((work[1] == '1')?0x10:0x00));
 }  }
   
 static void setsnd26intpara(HWND hWnd, BYTE value) {  static void setsnd26intpara(HWND hWnd, UINT8 value) {
   
         SendMessage(hWnd, CB_SETCURSEL,          SendMessage(hWnd, CB_SETCURSEL,
                                                 (WPARAM)snd26paranum[(value >> 6) & 3], (LPARAM)0);                                                  (WPARAM)snd26paranum[(value >> 6) & 3], (LPARAM)0);
 }  }
   
 static BYTE getsnd26int(HWND hWnd, WORD res) {  static UINT8 getsnd26int(HWND hWnd, UINT16 res) {
   
         char    work[8];          TCHAR   work[8];
   
         GetDlgItemText(hWnd, res, work, sizeof(work));          GetDlgItemText(hWnd, res, work, NELEMENTS(work));
         switch(work[3]) {          switch(work[3]) {
                 case '0':                  case '0':
                         return(0x00);                          return(0x00);
Line 250  static BYTE getsnd26int(HWND hWnd, WORD  Line 255  static BYTE getsnd26int(HWND hWnd, WORD 
         return(0xc0);          return(0xc0);
 }  }
   
 static void setsnd26rompara(HWND hWnd, BYTE value) {  static void setsnd26rompara(HWND hWnd, UINT8 value) {
   
         int             para;          int             para;
   
Line 261  static void setsnd26rompara(HWND hWnd, B Line 266  static void setsnd26rompara(HWND hWnd, B
         SendMessage(hWnd, CB_SETCURSEL, (WPARAM)para, (LPARAM)0);          SendMessage(hWnd, CB_SETCURSEL, (WPARAM)para, (LPARAM)0);
 }  }
   
 static BYTE getsnd26rom(HWND hWnd, WORD res) {  static UINT8 getsnd26rom(HWND hWnd, UINT16 res) {
   
         char    work[8];          TCHAR   work[8];
         DWORD   adrs;          UINT32  adrs;
   
         GetDlgItemText(hWnd, res, work, sizeof(work));          GetDlgItemText(hWnd, res, work, NELEMENTS(work));
         adrs = ((DWORD)milstr_solveHEX(work) - 0xc8000) >> 14;          adrs = ((UINT32)milstr_solveHEX(work) - 0xc8000) >> 14;
         if (adrs < 4) {          if (adrs < 4) {
                 return((BYTE)adrs);                  return((UINT8)adrs);
         }          }
         return(4);          return(4);
 }  }
Line 277  static BYTE getsnd26rom(HWND hWnd, WORD  Line 282  static BYTE getsnd26rom(HWND hWnd, WORD 
   
 // ---- PC-9801-26  // ---- PC-9801-26
   
 static  BYTE    snd26 = 0;  static  UINT8   snd26 = 0;
   
   
 static void set26jmp(HWND hWnd, BYTE value, BYTE bit) {  static void set26jmp(HWND hWnd, UINT8 value, UINT8 bit) {
   
         if ((snd26 ^ value) & bit) {          if ((snd26 ^ value) & bit) {
                 snd26 &= ~bit;                  snd26 &= ~bit;
Line 295  static void snd26cmdjmp(HWND hWnd) { Line 300  static void snd26cmdjmp(HWND hWnd) {
         RECT    rect2;          RECT    rect2;
         POINT   p;          POINT   p;
         BOOL    redraw;          BOOL    redraw;
         BYTE    b;          UINT8   b;
         BYTE    bit;          UINT8   bit;
   
         GetWindowRect(GetDlgItem(hWnd, IDC_SND26JMP), &rect1);          GetWindowRect(GetDlgItem(hWnd, IDC_SND26JMP), &rect1);
         GetClientRect(GetDlgItem(hWnd, IDC_SND26JMP), &rect2);          GetClientRect(GetDlgItem(hWnd, IDC_SND26JMP), &rect2);
Line 310  static void snd26cmdjmp(HWND hWnd) { Line 315  static void snd26cmdjmp(HWND hWnd) {
                 return;                  return;
         }          }
         if ((p.x >= 2) && (p.x < 7)) {          if ((p.x >= 2) && (p.x < 7)) {
                 b = (BYTE)(p.x - 2);                  b = (UINT8)(p.x - 2);
                 if ((snd26 ^ b) & 7) {                  if ((snd26 ^ b) & 7) {
                         snd26 &= ~0x07;                          snd26 &= ~0x07;
                         snd26 |= b;                          snd26 |= b;
Line 341  static void snd26cmdjmp(HWND hWnd) { Line 346  static void snd26cmdjmp(HWND hWnd) {
                 }                  }
         }          }
         else if ((p.x >= 15) && (p.x < 17)) {          else if ((p.x >= 15) && (p.x < 17)) {
                 b = (BYTE)((p.x - 15) << 4);                  b = (UINT8)((p.x - 15) << 4);
                 if ((snd26 ^ b) & 0x10) {                  if ((snd26 ^ b) & 0x10) {
                         snd26 &= ~0x10;                          snd26 &= ~0x10;
                         snd26 |= b;                          snd26 |= b;
Line 424  static LRESULT CALLBACK Snd26optDlgProc( Line 429  static LRESULT CALLBACK Snd26optDlgProc(
   
 // ---- PC-9801-86  // ---- PC-9801-86
   
 static  BYTE    snd86 = 0;  static  UINT8   snd86 = 0;
   
 static const UINT snd86paranum[4] = {0, 1, 3, 2};  static const UINT snd86paranum[4] = {0, 1, 3, 2};
   
   
 static void setsnd86iopara(HWND hWnd, BYTE value) {  static void setsnd86iopara(HWND hWnd, UINT8 value) {
   
         SendMessage(hWnd, CB_SETCURSEL, (WPARAM)((~value) & 1), (LPARAM)0);          SendMessage(hWnd, CB_SETCURSEL, (WPARAM)((~value) & 1), (LPARAM)0);
 }  }
   
 static BYTE getsnd86io(HWND hWnd, WORD res) {  static UINT8 getsnd86io(HWND hWnd, UINT16 res) {
   
         char    work[8];          TCHAR   work[8];
   
         GetDlgItemText(hWnd, res, work, sizeof(work));          GetDlgItemText(hWnd, res, work, NELEMENTS(work));
         return((BYTE)((work[1] == '1')?0x01:0x00));          return((UINT8)((work[1] == '1')?0x01:0x00));
 }  }
   
 static void setsnd86intpara(HWND hWnd, BYTE value) {  static void setsnd86intpara(HWND hWnd, UINT8 value) {
   
         SendMessage(hWnd, CB_SETCURSEL,          SendMessage(hWnd, CB_SETCURSEL,
                                                 (WPARAM)snd86paranum[(value >> 2) & 3], (LPARAM)0);                                                  (WPARAM)snd86paranum[(value >> 2) & 3], (LPARAM)0);
 }  }
   
 static BYTE getsnd86int(HWND hWnd) {  static UINT8 getsnd86int(HWND hWnd) {
   
         char    work[8];          TCHAR   work[8];
   
         Edit_GetText(hWnd, work, sizeof(work));          Edit_GetText(hWnd, work, NELEMENTS(work));
         switch(work[3]) {          switch(work[3]) {
                 case '0':                  case '0':
                         return(0x00);                          return(0x00);
Line 466  static BYTE getsnd86int(HWND hWnd) { Line 471  static BYTE getsnd86int(HWND hWnd) {
         return(0x0c);          return(0x0c);
 }  }
   
 static void setsnd86idpara(HWND hWnd, BYTE value) {  static void setsnd86idpara(HWND hWnd, UINT8 value) {
   
         SendMessage(hWnd, CB_SETCURSEL, (WPARAM)(((~value) >> 5) & 7), (LPARAM)0);          SendMessage(hWnd, CB_SETCURSEL, (WPARAM)(((~value) >> 5) & 7), (LPARAM)0);
 }  }
   
 static BYTE getsnd86id(HWND hWnd) {  static UINT8 getsnd86id(HWND hWnd) {
   
         char    work[8];          TCHAR   work[8];
   
         Edit_GetText(hWnd, work, sizeof(work));          Edit_GetText(hWnd, work, NELEMENTS(work));
         return((~work[0] & 7) << 5);          return((~work[0] & 7) << 5);
 }  }
   
 static void set86jmp(HWND hWnd, BYTE value, BYTE bit) {  static void set86jmp(HWND hWnd, UINT8 value, UINT8 bit) {
   
         if ((snd86 ^ value) & bit) {          if ((snd86 ^ value) & bit) {
                 snd86 &= ~bit;                  snd86 &= ~bit;
Line 619  static LRESULT CALLBACK Snd86optDlgProc( Line 624  static LRESULT CALLBACK Snd86optDlgProc(
   
 // ---- Speak board  // ---- Speak board
   
 static  BYTE    spb = 0;  static  UINT8   spb = 0;
 static  BYTE    spbvrc = 0;  static  UINT8   spbvrc = 0;
   
   
 static void setspbVRch(HWND hWnd) {  static void setspbVRch(HWND hWnd) {
Line 659  static void spbcmdjmp(HWND hWnd) { Line 664  static void spbcmdjmp(HWND hWnd) {
         RECT    rect2;          RECT    rect2;
         POINT   p;          POINT   p;
         BOOL    redraw;          BOOL    redraw;
         BYTE    b;          UINT8   b;
         BYTE    bit;          UINT8   bit;
   
         GetWindowRect(GetDlgItem(hWnd, IDC_SPBJMP), &rect1);          GetWindowRect(GetDlgItem(hWnd, IDC_SPBJMP), &rect1);
         GetClientRect(GetDlgItem(hWnd, IDC_SPBJMP), &rect2);          GetClientRect(GetDlgItem(hWnd, IDC_SPBJMP), &rect2);
Line 700  static void spbcmdjmp(HWND hWnd) { Line 705  static void spbcmdjmp(HWND hWnd) {
                 redraw = TRUE;                  redraw = TRUE;
         }          }
         else if ((p.x >= 10) && (p.x < 12)) {          else if ((p.x >= 10) && (p.x < 12)) {
                 b = (BYTE)((p.x - 10) << 4);                  b = (UINT8)((p.x - 10) << 4);
                 if ((spb ^ b) & 0x10) {                  if ((spb ^ b) & 0x10) {
                         spb &= ~0x10;                          spb &= ~0x10;
                         spb |= b;                          spb |= b;
Line 709  static void spbcmdjmp(HWND hWnd) { Line 714  static void spbcmdjmp(HWND hWnd) {
                 }                  }
         }          }
         else if ((p.x >= 14) && (p.x < 19)) {          else if ((p.x >= 14) && (p.x < 19)) {
                 b = (BYTE)(p.x - 14);                  b = (UINT8)(p.x - 14);
                 if ((spb ^ b) & 7) {                  if ((spb ^ b) & 7) {
                         spb &= ~0x07;                          spb &= ~0x07;
                         spb |= b;                          spb |= b;
Line 718  static void spbcmdjmp(HWND hWnd) { Line 723  static void spbcmdjmp(HWND hWnd) {
                 }                  }
         }          }
         else if ((p.x >= 21) && (p.x < 24)) {          else if ((p.x >= 21) && (p.x < 24)) {
                 spbvrc ^= (BYTE)(3 - p.y);                  spbvrc ^= (UINT8)(3 - p.y);
                 setspbVRch(hWnd);                  setspbVRch(hWnd);
                 redraw = TRUE;                  redraw = TRUE;
         }          }
Line 727  static void spbcmdjmp(HWND hWnd) { Line 732  static void spbcmdjmp(HWND hWnd) {
         }          }
 }  }
   
 static void setspbjmp(HWND hWnd, BYTE value, BYTE bit) {  static void setspbjmp(HWND hWnd, UINT8 value, UINT8 bit) {
   
         if ((spb ^ value) & bit) {          if ((spb ^ value) & bit) {
                 spb &= ~bit;                  spb &= ~bit;
Line 736  static void setspbjmp(HWND hWnd, BYTE va Line 741  static void setspbjmp(HWND hWnd, BYTE va
         }          }
 }  }
   
 static BYTE getspbVRch(HWND hWnd) {  static UINT8 getspbVRch(HWND hWnd) {
   
         BYTE    ret;          UINT8   ret;
   
         ret = 0;          ret = 0;
         if (Button_GetCheck(GetDlgItem(hWnd, IDC_SPBVRL))) {          if (Button_GetCheck(GetDlgItem(hWnd, IDC_SPBVRL))) {
Line 752  static BYTE getspbVRch(HWND hWnd) { Line 757  static BYTE getspbVRch(HWND hWnd) {
   
 static LRESULT CALLBACK SPBoptDlgProc(HWND hWnd, UINT msg,  static LRESULT CALLBACK SPBoptDlgProc(HWND hWnd, UINT msg,
                                                                                                         WPARAM wp, LPARAM lp) {                                                                                                          WPARAM wp, LPARAM lp) {
         BYTE    b;          UINT8   b;
         UINT    update;          UINT    update;
   
         switch(msg) {          switch(msg) {
Line 761  static LRESULT CALLBACK SPBoptDlgProc(HW Line 766  static LRESULT CALLBACK SPBoptDlgProc(HW
                         return(TRUE);                          return(TRUE);
   
                 case WM_COMMAND:                  case WM_COMMAND:
                         switch (LOWORD(wp)) {                          switch(LOWORD(wp)) {
                                 case IDC_SPBIO:                                  case IDC_SPBIO:
                                         setspbjmp(hWnd, getsnd26io(hWnd, IDC_SPBIO), 0x10);                                          setspbjmp(hWnd, getsnd26io(hWnd, IDC_SPBIO), 0x10);
                                         break;                                          break;
Line 811  static LRESULT CALLBACK SPBoptDlgProc(HW Line 816  static LRESULT CALLBACK SPBoptDlgProc(HW
                                         np2cfg.spb_vrc = spbvrc;                                          np2cfg.spb_vrc = spbvrc;
                                         update |= SYS_UPDATECFG;                                          update |= SYS_UPDATECFG;
                                 }                                  }
                                 b = (BYTE)SendDlgItemMessage(hWnd, IDC_SPBVRLEVEL,                                  b = (UINT8)SendDlgItemMessage(hWnd, IDC_SPBVRLEVEL,
                                                                                                                         TBM_GETPOS, 0, 0);                                                                                                                          TBM_GETPOS, 0, 0);
                                 if (np2cfg.spb_vrl != b) {                                  if (np2cfg.spb_vrl != b) {
                                         np2cfg.spb_vrl = b;                                          np2cfg.spb_vrl = b;
                                         update |= SYS_UPDATECFG;                                          update |= SYS_UPDATECFG;
                                 }                                  }
                                 opngen_setVR(np2cfg.spb_vrc, np2cfg.spb_vrl);                                  opngen_setVR(np2cfg.spb_vrc, np2cfg.spb_vrl);
                                 b = (BYTE)(Button_GetCheck(GetDlgItem(hWnd, IDC_SPBREVERSE))?                                                                                                                                                   1:0);                                  b = (UINT8)(Button_GetCheck(GetDlgItem(hWnd, IDC_SPBREVERSE))
                                                                                                                                                   ?1:0);
                                 if (np2cfg.spb_x != b) {                                  if (np2cfg.spb_x != b) {
                                         np2cfg.spb_x = b;                                          np2cfg.spb_x = b;
                                         update |= SYS_UPDATECFG;                                          update |= SYS_UPDATECFG;
Line 844  static LRESULT CALLBACK SPBoptDlgProc(HW Line 850  static LRESULT CALLBACK SPBoptDlgProc(HW
 typedef struct {  typedef struct {
         UINT16  res;          UINT16  res;
         UINT16  bit;          UINT16  bit;
         BYTE    *ptr;          UINT8   *ptr;
 } CHECKTBL;  } CHECKTBL;
   
 static const CHECKTBL pad1opt[13] = {  static const CHECKTBL pad1opt[13] = {
Line 869  static void checkbtnres_load(HWND hWnd,  Line 875  static void checkbtnres_load(HWND hWnd, 
                                                                 (*(item->ptr)) & (1 << (item->bit)));                                                                  (*(item->ptr)) & (1 << (item->bit)));
 }  }
   
 static BYTE checkbtnres_store(HWND hWnd, const CHECKTBL *item) {  static UINT8 checkbtnres_store(HWND hWnd, const CHECKTBL *item) {
   
         BYTE    value;          UINT8   value;
         BYTE    bit;          UINT8   bit;
         BYTE    ret;          UINT8   ret;
   
         bit = 1 << (item->bit);          bit = 1 << (item->bit);
         value = ((Button_GetCheck(GetDlgItem(hWnd, item->res)))?0xff:0) & bit;          value = ((Button_GetCheck(GetDlgItem(hWnd, item->res)))?0xff:0) & bit;
Line 888  static LRESULT CALLBACK PAD1optDlgProc(H Line 894  static LRESULT CALLBACK PAD1optDlgProc(H
                                                                                                         WPARAM wp, LPARAM lp) {                                                                                                          WPARAM wp, LPARAM lp) {
   
         int             i;          int             i;
         BYTE    renewal;          UINT8   renewal;
   
         switch(msg) {          switch(msg) {
                 case WM_INITDIALOG:                  case WM_INITDIALOG:
Line 927  void dialog_sndopt(HWND hWnd) { Line 933  void dialog_sndopt(HWND hWnd) {
         PROPSHEETHEADER psh;          PROPSHEETHEADER psh;
         HPROPSHEETPAGE  hpsp[6];                                                                                // ver0.29          HPROPSHEETPAGE  hpsp[6];                                                                                // ver0.29
   
         hinst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE);  #if defined(_WIN64)
           hinst = reinterpret_cast<HINSTANCE>(::GetWindowLongPtr(hWnd, GWLP_HINSTANCE));
   #else
           hinst = reinterpret_cast<HINSTANCE>(::GetWindowLong(hWnd, GWL_HINSTANCE));
   #endif
   
         ZeroMemory(&psp, sizeof(psp));          ZeroMemory(&psp, sizeof(psp));
         psp.dwSize = sizeof(PROPSHEETPAGE);          psp.dwSize = sizeof(PROPSHEETPAGE);
Line 974  void dialog_sndopt(HWND hWnd) { Line 984  void dialog_sndopt(HWND hWnd) {
 // ----  // ----
   
 #if defined(SUPPORT_S98)  #if defined(SUPPORT_S98)
 static const char s98ui_file[] = "NP2_%04d.S98";  static const TCHAR s98ui_file[] = _T("NP2_%04d.S98");
 static const char s98ui_title[] = "Save as S98 log";  static const TCHAR s98ui_title[] = _T("Save as S98 log");
 static const char s98ui_ext[] = "s98";  static const TCHAR s98ui_ext[] = _T("s98");
 static const char s98ui_filter[] = "S98 log (*.s98)\0*.s98\0";  static const TCHAR s98ui_filter[] = _T("S98 log (*.s98)\0*.s98\0");
 static const FILESEL s98ui = {s98ui_title, s98ui_ext, s98ui_filter, 1};  static const FILESEL s98ui = {s98ui_title, s98ui_ext, s98ui_filter, 1};
   
 void dialog_s98(HWND hWnd) {  void dialog_s98(HWND hWnd) {
   
         BOOL    check;          BOOL    check;
         char    path[MAX_PATH];          TCHAR   path[MAX_PATH];
   
         S98_close();          S98_close();
         check = FALSE;          check = FALSE;
         file_cpyname(path, bmpfilefolder, sizeof(path));          file_cpyname(path, bmpfilefolder, NELEMENTS(path));
         file_cutname(path);          file_cutname(path);
         file_catname(path, s98ui_file, sizeof(path));          file_catname(path, s98ui_file, NELEMENTS(path));
         if ((dlgs_selectwritenum(hWnd, &s98ui, path, sizeof(path))) &&          if ((dlgs_selectwritenum(hWnd, &s98ui, path, NELEMENTS(path))) &&
                 (S98_open(path) == SUCCESS)) {                  (S98_open(path) == SUCCESS)) {
                 file_cpyname(bmpfilefolder, path, sizeof(bmpfilefolder));                  file_cpyname(bmpfilefolder, path, NELEMENTS(bmpfilefolder));
                 sysmng_update(SYS_UPDATEOSCFG);                  sysmng_update(SYS_UPDATEOSCFG);
                 check = TRUE;                  check = TRUE;
         }          }
Line 1004  void dialog_s98(HWND hWnd) { Line 1014  void dialog_s98(HWND hWnd) {
 // ----  // ----
   
 #if defined(SUPPORT_WAVEREC)  #if defined(SUPPORT_WAVEREC)
 static const char wrui_file[] = "NP2_%04d.WAV";  static const TCHAR wrui_file[] = _T("NP2_%04d.WAV");
 static const char wrui_title[] = "Save as Sound";  static const TCHAR wrui_title[] = _T("Save as Sound");
 static const char wrui_ext[] = "WAV";  static const TCHAR wrui_ext[] = _T("WAV");
 static const char wrui_filter[] = "Wave files (*.wav)\0*.wav\0";  static const TCHAR wrui_filter[] = _T("Wave files (*.wav)\0*.wav\0");
 static const FILESEL wrui = {wrui_title, wrui_ext, wrui_filter, 1};  static const FILESEL wrui = {wrui_title, wrui_ext, wrui_filter, 1};
   
 void dialog_waverec(HWND hWnd) {  void dialog_waverec(HWND hWnd) {
   
         BYTE    check;          UINT8   check;
         char    path[MAX_PATH];          TCHAR   path[MAX_PATH];
   
         check = FALSE;          check = FALSE;
         sound_recstop();          sound_recstop();
         file_cpyname(path, bmpfilefolder, sizeof(path));          file_cpyname(path, bmpfilefolder, NELEMENTS(path));
         file_cutname(path);          file_cutname(path);
         file_catname(path, wrui_file, sizeof(path));          file_catname(path, wrui_file, NELEMENTS(path));
         if ((dlgs_selectwritenum(hWnd, &wrui, path, sizeof(path))) &&          if ((dlgs_selectwritenum(hWnd, &wrui, path, NELEMENTS(path))) &&
                 (sound_recstart(path) == SUCCESS)) {                  (sound_recstart(path) == SUCCESS)) {
                 file_cpyname(bmpfilefolder, path, sizeof(bmpfilefolder));                  file_cpyname(bmpfilefolder, path, NELEMENTS(bmpfilefolder));
                 sysmng_update(SYS_UPDATEOSCFG);                  sysmng_update(SYS_UPDATEOSCFG);
                 check = TRUE;                  check = TRUE;
         }          }

Removed from v.1.5  
changed lines
  Added in v.1.7


RetroPC.NET-CVS <cvs@retropc.net>