diff options
Diffstat (limited to 'gfx')
-rw-r--r-- | gfx/layers/composite/FPSCounter.cpp | 4 | ||||
-rw-r--r-- | gfx/thebes/gfxPlatform.cpp | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gfx/layers/composite/FPSCounter.cpp b/gfx/layers/composite/FPSCounter.cpp index b8e93eb97b..0cbc76066d 100644 --- a/gfx/layers/composite/FPSCounter.cpp +++ b/gfx/layers/composite/FPSCounter.cpp @@ -364,7 +364,11 @@ FPSCounter::WriteFrameTimeStamps() PR_Close(fd); nsAutoCString path; +#ifdef XP_WIN + rv = resultFile->GetPersistentDescriptor(path); +#else rv = resultFile->GetNativePath(path); +#endif NS_ENSURE_SUCCESS(rv, rv); printf_stderr("Wrote FPS data to file: %s\n", path.get()); diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 7ec9139c0a..43980498d3 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -490,7 +490,7 @@ void RecordingPrefChanged(const char *aPrefName, void *aClosure) nsAdoptingString prefFileName = Preferences::GetString("gfx.2d.recordingfile"); if (prefFileName) { - fileName.Append(NS_ConvertUTF16toUTF8(prefFileName)); + CopyUTF16toUTF8(prefFileName, fileName); } else { nsCOMPtr<nsIFile> tmpFile; if (NS_FAILED(NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(tmpFile)))) { @@ -502,7 +502,12 @@ void RecordingPrefChanged(const char *aPrefName, void *aClosure) if (NS_FAILED(rv)) return; +#ifdef XP_WIN + rv = tmpFile->GetPath(prefFileName); + CopyUTF16toUTF8(prefFileName, fileName); +#else rv = tmpFile->GetNativePath(fileName); +#endif if (NS_FAILED(rv)) return; } |