From 613b9ec9941cfcd4d3888a1ee75e70f53b10c7a9 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Mon, 8 Jul 2013 00:10:23 +0200 Subject: [PATCH] Change a variable name to match the name used in the ini file. Default screenshots to JPG. --- Core/Config.cpp | 4 ++-- Core/Config.h | 2 +- UI/NativeApp.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 4da0d8de2f..2e46aa9ac2 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -61,7 +61,7 @@ void Config::Load(const char *iniFileName) general->Get("NumWorkerThreads", &iNumWorkerThreads, cpu_info.num_cores); general->Get("EnableCheats", &bEnableCheats, false); general->Get("MaxRecent", &iMaxRecent, 12); - general->Get("ScreenshotsAsPNG", &bScreenshotAsPNG, true); + general->Get("ScreenshotsAsPNG", &bScreenshotsAsPNG, false); // Fix issue from switching from uint (hex in .ini) to int (dec) if (iMaxRecent == 0) @@ -210,7 +210,7 @@ void Config::Save() general->Set("NumWorkerThreads", iNumWorkerThreads); general->Set("MaxRecent", iMaxRecent); general->Set("EnableCheats", bEnableCheats); - general->Set("ScreenshotsAsPNG", &bScreenshotAsPNG); + general->Set("ScreenshotsAsPNG", &bScreenshotsAsPNG); IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU"); cpu->Set("Jit", bJit); diff --git a/Core/Config.h b/Core/Config.h index 05967be8e7..2ca9499203 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -49,7 +49,7 @@ public: // General bool bNewUI; // "Hidden" setting, does not get saved to ini file. int iNumWorkerThreads; - bool bScreenshotAsPNG; + bool bScreenshotsAsPNG; // Core bool bIgnoreBadMemAccess; diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 3b35a043ce..163cdc5952 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -467,7 +467,7 @@ void TakeScreenshot() { char temp[256]; while (i < 10000){ - if(g_Config.bScreenshotAsPNG) + if(g_Config.bScreenshotsAsPNG) sprintf(temp, "screenshots/screen%05d.png", i); else sprintf(temp, "screenshots/screen%05d.jpg", i); @@ -488,7 +488,7 @@ void TakeScreenshot() { memcpy(flipbuffer + y * pixel_xres * 4, buffer + (pixel_yres - y - 1) * pixel_xres * 4, pixel_xres * 4); } - if(g_Config.bScreenshotAsPNG) + if(g_Config.bScreenshotsAsPNG) stbi_write_png(temp, pixel_xres, pixel_yres, 4, flipbuffer, pixel_xres * 4); else {