Change a variable name to match the name used in the ini file. Default screenshots to JPG.
This commit is contained in:
parent
a4e95e5ce9
commit
613b9ec994
3 changed files with 5 additions and 5 deletions
|
@ -61,7 +61,7 @@ void Config::Load(const char *iniFileName)
|
||||||
general->Get("NumWorkerThreads", &iNumWorkerThreads, cpu_info.num_cores);
|
general->Get("NumWorkerThreads", &iNumWorkerThreads, cpu_info.num_cores);
|
||||||
general->Get("EnableCheats", &bEnableCheats, false);
|
general->Get("EnableCheats", &bEnableCheats, false);
|
||||||
general->Get("MaxRecent", &iMaxRecent, 12);
|
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)
|
// Fix issue from switching from uint (hex in .ini) to int (dec)
|
||||||
if (iMaxRecent == 0)
|
if (iMaxRecent == 0)
|
||||||
|
@ -210,7 +210,7 @@ void Config::Save()
|
||||||
general->Set("NumWorkerThreads", iNumWorkerThreads);
|
general->Set("NumWorkerThreads", iNumWorkerThreads);
|
||||||
general->Set("MaxRecent", iMaxRecent);
|
general->Set("MaxRecent", iMaxRecent);
|
||||||
general->Set("EnableCheats", bEnableCheats);
|
general->Set("EnableCheats", bEnableCheats);
|
||||||
general->Set("ScreenshotsAsPNG", &bScreenshotAsPNG);
|
general->Set("ScreenshotsAsPNG", &bScreenshotsAsPNG);
|
||||||
|
|
||||||
IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU");
|
IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU");
|
||||||
cpu->Set("Jit", bJit);
|
cpu->Set("Jit", bJit);
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
// General
|
// General
|
||||||
bool bNewUI; // "Hidden" setting, does not get saved to ini file.
|
bool bNewUI; // "Hidden" setting, does not get saved to ini file.
|
||||||
int iNumWorkerThreads;
|
int iNumWorkerThreads;
|
||||||
bool bScreenshotAsPNG;
|
bool bScreenshotsAsPNG;
|
||||||
|
|
||||||
// Core
|
// Core
|
||||||
bool bIgnoreBadMemAccess;
|
bool bIgnoreBadMemAccess;
|
||||||
|
|
|
@ -467,7 +467,7 @@ void TakeScreenshot() {
|
||||||
|
|
||||||
char temp[256];
|
char temp[256];
|
||||||
while (i < 10000){
|
while (i < 10000){
|
||||||
if(g_Config.bScreenshotAsPNG)
|
if(g_Config.bScreenshotsAsPNG)
|
||||||
sprintf(temp, "screenshots/screen%05d.png", i);
|
sprintf(temp, "screenshots/screen%05d.png", i);
|
||||||
else
|
else
|
||||||
sprintf(temp, "screenshots/screen%05d.jpg", i);
|
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);
|
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);
|
stbi_write_png(temp, pixel_xres, pixel_yres, 4, flipbuffer, pixel_xres * 4);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue