--- np2/win9x/dialog/d_sound.cpp 2003/10/18 09:02:38 1.2 +++ np2/win9x/dialog/d_sound.cpp 2003/10/29 21:35:58 1.5 @@ -2,19 +2,20 @@ #include #include #include -#include "resource.h" #include "strres.h" +#include "resource.h" #include "np2.h" +#include "dosio.h" #include "joymng.h" #include "sysmng.h" #include "menu.h" +#include "dialog.h" +#include "dialogs.h" +#include "bit2res.h" #include "pccore.h" #include "iocore.h" #include "sound.h" #include "fmboard.h" -#include "bit2res.h" -#include "dialog.h" -#include "dialogs.h" #include "s98.h" @@ -137,7 +138,7 @@ static LRESULT CALLBACK SndmixDlgProc(HW break; case WM_NOTIFY: - if ((((NMHDR *)lp)->code) == PSN_APPLY) { + if ((((NMHDR *)lp)->code) == (UINT)PSN_APPLY) { for (i=0; i<5; i++) { if (sliderrestore(hWnd, &sndmixitem[i])) { sysmng_update(SYS_UPDATECFG); @@ -193,7 +194,7 @@ static LRESULT CALLBACK Snd14optDlgProc( break; case WM_NOTIFY: - if ((((NMHDR *)lp)->code) == PSN_APPLY) { + if ((((NMHDR *)lp)->code) == (UINT)PSN_APPLY) { for (i=0; i<6; i++) { if (sliderrestore(hWnd, &snd14item[i])) { sysmng_update(SYS_UPDATECFG); @@ -456,7 +457,7 @@ static LRESULT CALLBACK Snd26optDlgProc( break; case WM_NOTIFY: - if ((((NMHDR *)lp)->code) == PSN_APPLY) { + if ((((NMHDR *)lp)->code) == (UINT)PSN_APPLY) { if (np2cfg.snd26opt != snd26) { np2cfg.snd26opt = snd26; sysmng_update(SYS_UPDATECFG); @@ -689,7 +690,7 @@ static LRESULT CALLBACK Snd86optDlgProc( break; case WM_NOTIFY: - if ((((NMHDR *)lp)->code) == PSN_APPLY) { + if ((((NMHDR *)lp)->code) == (UINT)PSN_APPLY) { if (np2cfg.snd86opt != snd86) { np2cfg.snd86opt = snd86; sysmng_update(SYS_UPDATECFG); @@ -919,7 +920,7 @@ static LRESULT CALLBACK SPBoptDlgProc(HW break; case WM_NOTIFY: - if ((((NMHDR *)lp)->code) == PSN_APPLY) { + if ((((NMHDR *)lp)->code) == (UINT)PSN_APPLY) { update = 0; if (np2cfg.spbopt != spb) { np2cfg.spbopt = spb; @@ -1012,7 +1013,7 @@ static LRESULT CALLBACK PAD1optDlgProc(H return(TRUE); case WM_NOTIFY: - if ((((NMHDR *)lp)->code) == PSN_APPLY) { + if ((((NMHDR *)lp)->code) == (UINT)PSN_APPLY) { renewal = 0; for (i=0; i<13; i++) { renewal |= checkbtnres_store(hWnd, pad1opt + i); @@ -1093,13 +1094,17 @@ static const FILESEL s98ui = {s98ui_titl void dialog_s98(HWND hWnd) { BOOL check; -const char *p; + char path[MAX_PATH]; S98_close(); check = FALSE; - p = dlgs_selectwritenum(hWnd, &s98ui, s98ui_file, - bmpfilefolder, sizeof(bmpfilefolder)); - if ((p != NULL) && (S98_open(p) == SUCCESS)) { + file_cpyname(path, bmpfilefolder, sizeof(path)); + file_cutname(path); + file_catname(path, s98ui_file, sizeof(path)); + if ((dlgs_selectwritenum(hWnd, &s98ui, path, sizeof(path))) && + (S98_open(path) == SUCCESS)) { + file_cpyname(bmpfilefolder, path, sizeof(bmpfilefolder)); + sysmng_update(SYS_UPDATEOSCFG); check = TRUE; } xmenu_sets98logging(check);