Make the paths we use a bit more portable (even in non portable code)
This commit is contained in:
parent
3c90492b10
commit
9b4c2ecd36
|
@ -90,7 +90,7 @@ void EEPROMInit(const eeprom_interface *interface)
|
|||
else locked = 0;
|
||||
|
||||
char output[128];
|
||||
sprintf (output, "config\\games\\%s.nv", BurnDrvGetTextA(DRV_NAME));
|
||||
sprintf (output, "config/games/%s.nv", BurnDrvGetTextA(DRV_NAME));
|
||||
|
||||
neeprom_available = 0;
|
||||
|
||||
|
@ -111,7 +111,7 @@ void EEPROMExit()
|
|||
#endif
|
||||
|
||||
char output[128];
|
||||
sprintf (output, "config\\games\\%s.nv", BurnDrvGetTextA(DRV_NAME));
|
||||
sprintf (output, "config/games/%s.nv", BurnDrvGetTextA(DRV_NAME));
|
||||
|
||||
neeprom_available = 0;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ static TCHAR* GameConfigName()
|
|||
{
|
||||
// Return the path of the config file for this game
|
||||
static TCHAR szName[32];
|
||||
_stprintf(szName, _T("config\\games\\%s.ini"), BurnDrvGetText(DRV_NAME));
|
||||
_stprintf(szName, _T("config/games/%s.ini"), BurnDrvGetText(DRV_NAME));
|
||||
return szName;
|
||||
}
|
||||
|
||||
|
|
|
@ -1529,9 +1529,9 @@ INT32 GameInputAutoIni(INT32 nPlayer, TCHAR* lpszFile, bool bOverWrite)
|
|||
|
||||
INT32 ConfigGameLoadHardwareDefaults()
|
||||
{
|
||||
TCHAR *szDefaultCpsFile = _T("config\\presets\\cps.ini");
|
||||
TCHAR *szDefaultNeogeoFile = _T("config\\presets\\neogeo.ini");
|
||||
TCHAR *szDefaultPgmFile = _T("config\\presets\\pgm.ini");
|
||||
TCHAR *szDefaultCpsFile = _T("config\presets\cps.ini");
|
||||
TCHAR *szDefaultNeogeoFile = _T("config\presets\neogeo.ini");
|
||||
TCHAR *szDefaultPgmFile = _T("config\presets\pgm.ini");
|
||||
TCHAR *szFileName = _T("");
|
||||
INT32 nApplyHardwareDefaults = 0;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#define SSHOT_LIBPNG_ERROR 2
|
||||
#define SSHOT_OTHER_ERROR 3
|
||||
|
||||
#define SSHOT_DIRECTORY "screenshots\\"
|
||||
#define SSHOT_DIRECTORY "screenshots/"
|
||||
|
||||
static UINT8* pSShot = NULL;
|
||||
static UINT8* pConvertedImage = NULL;
|
||||
|
|
|
@ -23,7 +23,7 @@ struct VidPresetDataVer VidPresetVer[4] = {
|
|||
|
||||
static void CreateConfigName(TCHAR* szConfig)
|
||||
{
|
||||
_stprintf(szConfig, _T("config\\%s.ini"), szAppExeName);
|
||||
_stprintf(szConfig, _T("config/%s.ini"), szAppExeName);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
int bDrvOkay = 0; // 1 if the Driver has been initted okay, and it's okay to use the BurnDrv functions
|
||||
|
||||
TCHAR szAppRomPaths[DIRS_MAX][MAX_PATH] = { { _T("") }, { _T("") }, { _T("") }, { _T("") }, { _T("") }, { _T("") }, { _T("") }, { _T("roms\\") } };
|
||||
TCHAR szAppRomPaths[DIRS_MAX][MAX_PATH] = { { _T("") }, { _T("") }, { _T("") }, { _T("") }, { _T("") }, { _T("") }, { _T("") }, { _T("roms/") } };
|
||||
|
||||
static bool bSaveRAM = false;
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ static void InitComboboxes()
|
|||
SendMessage(hInpdPci, CB_ADDSTRING, 0, (LPARAM)FBALoadStringEx(hAppInst, IDS_INPUT_INP_HOTRODR, true));
|
||||
|
||||
// Scan presets directory for .ini files and add them to the list
|
||||
if ((search = FindFirstFile(_T("config\\presets\\*.ini"), &findData)) != INVALID_HANDLE_VALUE) {
|
||||
if ((search = FindFirstFile(_T("config/presets/*.ini"), &findData)) != INVALID_HANDLE_VALUE) {
|
||||
do {
|
||||
findData.cFileName[_tcslen(findData.cFileName) - 4] = 0;
|
||||
SendMessage(hInpdPci, CB_ADDSTRING, 0, (LPARAM)findData.cFileName);
|
||||
|
|
|
@ -1652,7 +1652,7 @@ static void MakeOfn()
|
|||
ofn.lpstrFilter = _T("FB Alpha localisation templates (*.flt)\0*.flt\0\0");
|
||||
ofn.lpstrFile = szChoice;
|
||||
ofn.nMaxFile = sizeof(szChoice) / sizeof(TCHAR);
|
||||
ofn.lpstrInitialDir = _T(".\\config\\localisation");
|
||||
ofn.lpstrInitialDir = _T("./config/localisation");
|
||||
ofn.Flags = OFN_NOCHANGEDIR | OFN_HIDEREADONLY;
|
||||
ofn.lpstrDefExt = _T("flt");
|
||||
|
||||
|
|
|
@ -776,23 +776,23 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int nShowCmd
|
|||
// Make sure there are roms and cfg subdirectories
|
||||
TCHAR szDirs[18][MAX_PATH] = {
|
||||
{_T("config")},
|
||||
{_T("config\\games")},
|
||||
{_T("config\\ips")},
|
||||
{_T("config\\localisation")},
|
||||
{_T("config\\presets")},
|
||||
{_T("config/games")},
|
||||
{_T("config/ips")},
|
||||
{_T("config/localisation")},
|
||||
{_T("config/presets")},
|
||||
{_T("recordings")},
|
||||
{_T("ROMs")},
|
||||
{_T("savestates")},
|
||||
{_T("screenshots")},
|
||||
{_T("support\\")},
|
||||
{_T("support\\previews\\")},
|
||||
{_T("support\\titles\\")},
|
||||
{_T("support\\cheats\\")},
|
||||
{_T("support\\hiscores\\")},
|
||||
{_T("support\\samples\\")},
|
||||
{_T("support\\ips\\")},
|
||||
{_T("support\\neocdz\\")},
|
||||
{_T("neocdiso\\")},
|
||||
{_T("support/")},
|
||||
{_T("support/previews/")},
|
||||
{_T("support/titles/")},
|
||||
{_T("support/cheats/")},
|
||||
{_T("support/hiscores/")},
|
||||
{_T("support/samples/")},
|
||||
{_T("support/ips/")},
|
||||
{_T("support/neocdz/")},
|
||||
{_T("neocdiso/")},
|
||||
};
|
||||
|
||||
for(int x = 0; x < 18; x++) {
|
||||
|
|
|
@ -31,8 +31,8 @@ static HBRUSH hWhiteBGBrush;
|
|||
|
||||
bool bNeoCDListScanSub = false;
|
||||
bool bNeoCDListScanOnlyISO = false;
|
||||
TCHAR szNeoCDCoverDir[MAX_PATH] = _T("support\\neocdz\\");
|
||||
TCHAR szNeoCDGamesDir[MAX_PATH] = _T("\\neocdiso\\");
|
||||
TCHAR szNeoCDCoverDir[MAX_PATH] = _T("support/neocdz/");
|
||||
TCHAR szNeoCDGamesDir[MAX_PATH] = _T("/neocdiso/");
|
||||
|
||||
static int nSelectedItem = -1;
|
||||
|
||||
|
@ -505,7 +505,7 @@ static void NeoCDList_ScanDir(HWND hList, TCHAR* pszDirectory)
|
|||
{
|
||||
|
||||
// Scan sub-directory for CUE
|
||||
_stprintf(szSubSearch, _T("%s%s\\*.cue"), pszDirectory, ffdDirectory.cFileName);
|
||||
_stprintf(szSubSearch, _T("%s%s/*.cue"), pszDirectory, ffdDirectory.cFileName);
|
||||
|
||||
hSubDirectory = FindFirstFile(szSubSearch, &ffdSubDirectory);
|
||||
|
||||
|
@ -523,14 +523,14 @@ static void NeoCDList_ScanDir(HWND hList, TCHAR* pszDirectory)
|
|||
{
|
||||
// Parse CUE
|
||||
TCHAR szParse[512] = _T("\0");
|
||||
_stprintf(szParse, _T("%s%s\\%s"), pszDirectory, ffdDirectory.cFileName, ffdSubDirectory.cFileName);
|
||||
_stprintf(szParse, _T("%s%s/%s"), pszDirectory, ffdDirectory.cFileName, ffdSubDirectory.cFileName);
|
||||
|
||||
//MessageBox(NULL, szParse, _T(""), MB_OK);
|
||||
|
||||
pszISO = NeoCDList_ParseCUE( szParse );
|
||||
|
||||
TCHAR szISO[512] =_T("\0");
|
||||
_stprintf(szISO, _T("%s%s\\%s"), pszDirectory, ffdDirectory.cFileName, pszISO);
|
||||
_stprintf(szISO, _T("%s%s/%s"), pszDirectory, ffdDirectory.cFileName, pszISO);
|
||||
|
||||
NeoCDList_CheckISO(hList, szISO);
|
||||
bDone = true;
|
||||
|
@ -560,7 +560,7 @@ static void NeoCDList_ScanDir(HWND hList, TCHAR* pszDirectory)
|
|||
memset(&ffdSubDirectory, 0, sizeof(WIN32_FIND_DATA));
|
||||
|
||||
// Scan sub-directory for ISO
|
||||
_stprintf(szSubSearch, _T("%s%s\\*.iso"), pszDirectory, ffdDirectory.cFileName);
|
||||
_stprintf(szSubSearch, _T("%s%s/*.iso"), pszDirectory, ffdDirectory.cFileName);
|
||||
|
||||
hSubDirectory = FindFirstFile(szSubSearch, &ffdSubDirectory);
|
||||
|
||||
|
@ -577,7 +577,7 @@ static void NeoCDList_ScanDir(HWND hList, TCHAR* pszDirectory)
|
|||
if(_tcsstr(ffdSubDirectory.cFileName, _T(".iso")) || _tcsstr(ffdSubDirectory.cFileName, _T(".ISO")))
|
||||
{
|
||||
TCHAR szISO[512] = _T("\0");
|
||||
_stprintf(szISO, _T("%s%s\\%s"), pszDirectory, ffdDirectory.cFileName, ffdSubDirectory.cFileName);
|
||||
_stprintf(szISO, _T("%s%s/%s"), pszDirectory, ffdDirectory.cFileName, ffdSubDirectory.cFileName);
|
||||
|
||||
NeoCDList_CheckISO(hList, szISO);
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ static void MakeOfn(TCHAR* pszFilter)
|
|||
ofn.lpstrFilter = pszFilter;
|
||||
ofn.lpstrFile = szChoice;
|
||||
ofn.nMaxFile = sizeof(szChoice) / sizeof(TCHAR);
|
||||
ofn.lpstrInitialDir = _T(".\\recordings");
|
||||
ofn.lpstrInitialDir = _T("./recordings");
|
||||
ofn.Flags = OFN_NOCHANGEDIR | OFN_HIDEREADONLY;
|
||||
ofn.lpstrDefExt = _T("fr");
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ static HANDLE hEvent = NULL;
|
|||
|
||||
static void CreateRomDatName(TCHAR* szRomDat)
|
||||
{
|
||||
_stprintf(szRomDat, _T("config\\%s.roms.dat"), szAppExeName);
|
||||
_stprintf(szRomDat, _T("config/%s.roms.dat"), szAppExeName);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ static void MakeOfn(TCHAR* pszFilter)
|
|||
ofn.lpstrFilter = pszFilter;
|
||||
ofn.lpstrFile = szChoice;
|
||||
ofn.nMaxFile = sizeof(szChoice) / sizeof(TCHAR);
|
||||
ofn.lpstrInitialDir = _T(".\\savestates");
|
||||
ofn.lpstrInitialDir = _T("./savestates");
|
||||
ofn.Flags = OFN_NOCHANGEDIR | OFN_HIDEREADONLY;
|
||||
ofn.lpstrDefExt = _T("fs");
|
||||
return;
|
||||
|
@ -26,7 +26,7 @@ int StatedAuto(int bSave)
|
|||
static TCHAR szName[32] = _T("");
|
||||
int nRet;
|
||||
|
||||
_stprintf(szName, _T("config\\games\\%s.fs"), BurnDrvGetText(DRV_NAME));
|
||||
_stprintf(szName, _T("config/games/%s.fs"), BurnDrvGetText(DRV_NAME));
|
||||
|
||||
if (bSave == 0) {
|
||||
nRet = BurnStateLoad(szName, bDrvSaveAll, NULL); // Load ram
|
||||
|
@ -42,7 +42,7 @@ int StatedAuto(int bSave)
|
|||
|
||||
static void CreateStateName(int nSlot)
|
||||
{
|
||||
_stprintf(szChoice, _T(".\\savestates\\%s slot %02x.fs"), BurnDrvGetText(DRV_NAME), nSlot);
|
||||
_stprintf(szChoice, _T("./savestates/%s slot %02x.fs"), BurnDrvGetText(DRV_NAME), nSlot);
|
||||
}
|
||||
|
||||
int StatedLoad(int nSlot)
|
||||
|
|
|
@ -5,12 +5,12 @@ static HWND hTabControl = NULL;
|
|||
static int nInitTabSelect = 0;
|
||||
static HWND hParent = NULL;
|
||||
|
||||
TCHAR szAppPreviewsPath[MAX_PATH] = _T("support\\previews\\");
|
||||
TCHAR szAppTitlesPath[MAX_PATH] = _T("support\\titles\\");
|
||||
TCHAR szAppCheatsPath[MAX_PATH] = _T("support\\cheats\\");
|
||||
TCHAR szAppHiscorePath[MAX_PATH] = _T("support\\hiscores\\");
|
||||
TCHAR szAppSamplesPath[MAX_PATH] = _T("support\\samples\\");
|
||||
TCHAR szAppIpsPath[MAX_PATH] = _T("support\\ips\\");
|
||||
TCHAR szAppPreviewsPath[MAX_PATH] = _T("support/previews/");
|
||||
TCHAR szAppTitlesPath[MAX_PATH] = _T("support/titles/");
|
||||
TCHAR szAppCheatsPath[MAX_PATH] = _T("support/cheats/");
|
||||
TCHAR szAppHiscorePath[MAX_PATH] = _T("support/hiscores/");
|
||||
TCHAR szAppSamplesPath[MAX_PATH] = _T("support/samples/");
|
||||
TCHAR szAppIpsPath[MAX_PATH] = _T("support/ips/");
|
||||
|
||||
static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
|
|
@ -1284,7 +1284,7 @@ static INT_PTR CALLBACK SysInfoProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM l
|
|||
|
||||
if (pExceptionPointers) {
|
||||
TCHAR szLogName[MAX_PATH];
|
||||
_stprintf(szLogName, _T("config\\%s.error.log"), szAppExeName);
|
||||
_stprintf(szLogName, _T("config/%s.error.log"), szAppExeName);
|
||||
fp = _tfopen(szLogName, _T("ab"));
|
||||
|
||||
EnableWindow(GetDlgItem(hDlg, IDC_SYSINFO_LOG), FALSE);
|
||||
|
|
|
@ -16,7 +16,7 @@ static void MakeOfn(TCHAR* pszFilter)
|
|||
ofn.lpstrFilter = pszFilter;
|
||||
ofn.lpstrFile = szChoice;
|
||||
ofn.nMaxFile = sizeof(szChoice) / sizeof(TCHAR);
|
||||
ofn.lpstrInitialDir = _T(".\\wav");
|
||||
ofn.lpstrInitialDir = _T("./wav");
|
||||
ofn.Flags = OFN_NOCHANGEDIR | OFN_HIDEREADONLY;
|
||||
ofn.lpstrDefExt = _T("wav");
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ static int isowavParseCueFile()
|
|||
QuoteRead(&szQuote, NULL, s);
|
||||
|
||||
_sntprintf(szFile, ExtractFilename(CDEmuImage) - CDEmuImage, _T("%s"), CDEmuImage);
|
||||
_sntprintf(szFile + (ExtractFilename(CDEmuImage) - CDEmuImage), 1024 - (ExtractFilename(CDEmuImage) - CDEmuImage), _T("\\%s"), szQuote);
|
||||
_sntprintf(szFile + (ExtractFilename(CDEmuImage) - CDEmuImage), 1024 - (ExtractFilename(CDEmuImage) - CDEmuImage), _T("/%s"), szQuote);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -774,7 +774,7 @@ static int InitEffectsSurfaces()
|
|||
}
|
||||
|
||||
// Get the filename and size of a pattern
|
||||
_tcscpy(pFilename, _T("pattern\\"));
|
||||
_tcscpy(pFilename, _T("pattern/"));
|
||||
_tcscat(pFilename, pRGBEffectPatternName);
|
||||
_stscanf(pRGBEffectPatternName, _T("%i x %i"), &nPatternXSize, &nPatternYSize);
|
||||
nPatternSize = nPatternXSize * nPatternYSize * 4;
|
||||
|
|
Loading…
Reference in New Issue