MCPcopy Create free account
hub / github.com/TASEmulators/fceux / SaveCDLogFileAs

Function SaveCDLogFileAs

src/drivers/win/cdlogger.cpp:257–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257void SaveCDLogFileAs()
258{
259 const char filter[]="Code Data Log File (*.CDL)\0*.cdl\0All Files (*.*)\0*.*\0\0";
260 char nameo[2048] = {0};
261 OPENFILENAME ofn;
262 memset(&ofn,0,sizeof(ofn));
263 ofn.lStructSize=sizeof(ofn);
264 ofn.hInstance=fceu_hInstance;
265 ofn.lpstrTitle="Save Code Data Log File As...";
266 ofn.lpstrFilter=filter;
267 if (loadedcdfile[0])
268 {
269 strcpy(nameo, loadedcdfile);
270 } else
271 {
272 strcpy(nameo, mass_replace(GetRomName(), "|", ".").c_str());
273 strcat(nameo, ".cdl");
274 }
275 ofn.lpstrDefExt = "cdl";
276 ofn.lpstrFile = nameo;
277 ofn.nMaxFile = 256;
278 ofn.Flags = OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
279 ofn.hwndOwner = hCDLogger;
280 if (!GetSaveFileName(&ofn))
281 return;
282 RenameCDLog(nameo);
283 SaveCDLogFile();
284}
285
286void SaveCDLogFile()
287{

Callers 1

CDLoggerCallBFunction · 0.85

Calls 4

mass_replaceFunction · 0.85
GetRomNameFunction · 0.85
RenameCDLogFunction · 0.70
SaveCDLogFileFunction · 0.70

Tested by

no test coverage detected