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

Function AbsoluteToRelative

src/drivers/win/replay.cpp:295–323  ·  view source on GitHub ↗

C:\fceu\movies\bla.fcm + C:\fceu\ -> movies\bla.fcm

Source from the content-addressed store, hash-verified

293
294// C:\fceu\movies\bla.fcm + C:\fceu\ -> movies\bla.fcm
295void AbsoluteToRelative(char *const dst, const char *const dir, const char *const root)
296{
297 int i, igood=0;
298
299 for(i = 0 ; ; i++)
300 {
301 int a = tolower(dir[i]);
302 int b = tolower(root[i]);
303 if(a == '/' || a == '\0' || a == '.') a = '\\';
304 if(b == '/' || b == '\0' || b == '.') b = '\\';
305
306 if(a != b)
307 {
308 igood = 0;
309 break;
310 }
311
312 if(a == '\\')
313 igood = i+1;
314
315 if(!dir[i] || !root[i])
316 break;
317 }
318
319// if(igood)
320// sprintf(dst, ".\\%s", dir + igood);
321// else
322 strcpy(dst, dir + igood);
323}
324
325
326INT_PTR CALLBACK ReplayMetadataDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)

Callers 2

HandleScanFunction · 0.85
ReplayDialogProcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected