xmil-libretro/win9x/dialog/d_sound.cpp

59 lines
1.2 KiB
C++
Raw Permalink Normal View History

/**
* @file d_sound.cpp
* @brief <EFBFBD>T<EFBFBD>E<EFBFBD><EFBFBD><EFBFBD>h <EFBFBD>t<EFBFBD>@<EFBFBD>C<EFBFBD><EFBFBD> <EFBFBD>A<EFBFBD>N<EFBFBD>Z<EFBFBD>X<EFBFBD>̓<EFBFBD><EFBFBD><EFBFBD><EFBFBD>̒<EFBFBD><EFBFBD>`<EFBFBD><EFBFBD><EFBFBD>s<EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD>
*/
2004-08-01 05:31:32 +00:00
#include "compiler.h"
2004-08-01 05:31:32 +00:00
#if defined(SUPPORT_X1F)
#include "d_sound.h"
#include "resource.h"
#include "xmil.h"
#include "dosio.h"
#include "sysmng.h"
#include "misc/DlgProc.h"
#include "x1f.h"
2004-08-01 05:31:32 +00:00
static const TCHAR x1fui_file[] = TEXT("xmil%04d.x1f");
2004-08-01 05:31:32 +00:00
/**
* X1F <EFBFBD>t<EFBFBD>@<EFBFBD>C<EFBFBD><EFBFBD><EFBFBD>I<EFBFBD><EFBFBD>
* @param[in] hWnd <EFBFBD>e<EFBFBD>E<EFBFBD>B<EFBFBD><EFBFBD><EFBFBD>h<EFBFBD>E
*/
void dialog_x1f(HWND hWnd)
{
2004-08-01 05:31:32 +00:00
x1f_close();
TCHAR szPath[MAX_PATH];
for (UINT i = 0; i < 10000; i++)
{
TCHAR szFilename[MAX_PATH];
wsprintf(szFilename, x1fui_file, i);
file_cpyname(szPath, fddfolder, _countof(szPath));
file_cutname(szPath);
file_catname(szPath, szFilename, _countof(szPath));
if (file_attr(szPath) == -1)
{
break;
}
}
std::tstring rTitle(LoadTString(IDS_X1FTITLE));
std::tstring rFilter(LoadTString(IDS_X1FFILTER));
std::tstring rExt(LoadTString(IDS_X1FEXT));
CFileDlg dlg(FALSE, rExt.c_str(), szPath, OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY, rFilter.c_str(), hWnd);
dlg.m_ofn.nFilterIndex = 1;
if (dlg.DoModal() == IDOK)
{
LPCTSTR lpPath = dlg.GetPathName();
if (x1f_open(lpPath) == SUCCESS)
{
file_cpyname(bmpfilefolder, lpPath, _countof(bmpfilefolder));
sysmng_update(SYS_UPDATEOSCFG);
}
2004-08-01 05:31:32 +00:00
}
}
#endif