From d5196b44f90843b2f62705a82a88c887c9e58e12 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 17 Jan 2016 09:45:55 -0800 Subject: [PATCH] Minor tweaks. --- Core/Util/GameManager.cpp | 2 +- Windows/MainWindowMenu.cpp | 2 +- headless/Compare.cpp | 2 +- headless/WindowsHeadlessHost.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/Util/GameManager.cpp b/Core/Util/GameManager.cpp index bfd5208d2d..842c387e05 100644 --- a/Core/Util/GameManager.cpp +++ b/Core/Util/GameManager.cpp @@ -236,7 +236,7 @@ bool GameManager::InstallGame(std::string zipfile, bool deleteAfter) { } zip_file *zf = zip_fopen_index(z, i, 0); - FILE *f = File::OpenCFile(outFilename.c_str(), "wb"); + FILE *f = File::OpenCFile(outFilename, "wb"); if (f) { size_t pos = 0; const size_t blockSize = 1024 * 128; diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp index 419bb43043..46cb5d2d54 100644 --- a/Windows/MainWindowMenu.cpp +++ b/Windows/MainWindowMenu.cpp @@ -806,7 +806,7 @@ namespace MainWindow { } else if (info.type == FILETYPE_DIRECTORY) { MessageBox(hWnd, L"Cannot extract directories.", L"Sorry", 0); } else if (W32Util::BrowseForFileName(false, hWnd, L"Save file as...", 0, L"All files\0*.*\0\0", L"", fn)) { - FILE *fp = File::OpenCFile(fn.c_str(), "wb"); + FILE *fp = File::OpenCFile(fn, "wb"); u32 handle = pspFileSystem.OpenFile(filename, FILEACCESS_READ, ""); u8 buffer[4096]; while (pspFileSystem.ReadFile(handle, buffer, sizeof(buffer)) > 0) { diff --git a/headless/Compare.cpp b/headless/Compare.cpp index 10a20f5cd5..556bd32873 100644 --- a/headless/Compare.cpp +++ b/headless/Compare.cpp @@ -339,7 +339,7 @@ double CompareScreenshot(const std::vector &pixels, u32 stride, u32 w, u32 // We assume the bitmap is the specified size, not including whatever stride. u32 *reference = (u32 *) calloc(stride * h, sizeof(u32)); - FILE *bmp = File::OpenCFile(screenshotFilename.c_str(), "rb"); + FILE *bmp = File::OpenCFile(screenshotFilename, "rb"); if (bmp) { // The bitmap header is 14 + 40 bytes. We could validate it but the test would fail either way. diff --git a/headless/WindowsHeadlessHost.cpp b/headless/WindowsHeadlessHost.cpp index 5eaf5b3f1e..e2e776f21c 100644 --- a/headless/WindowsHeadlessHost.cpp +++ b/headless/WindowsHeadlessHost.cpp @@ -117,7 +117,7 @@ void WindowsHeadlessHost::SendDebugScreenshot(const u8 *pixbuf, u32 w, u32 h) { // Lazy, just read in the original header to output the failed screenshot. u8 header[14 + 40] = {0}; - FILE *bmp = File::OpenCFile(comparisonScreenshot.c_str(), "rb"); + FILE *bmp = File::OpenCFile(comparisonScreenshot, "rb"); if (bmp) { fread(&header, sizeof(header), 1, bmp);