From a7c05dc92238598dbc379429418dd667977a7d33 Mon Sep 17 00:00:00 2001 From: lioncash Date: Thu, 4 Apr 2013 09:32:28 -0400 Subject: Remove an unused variable in VideoConfig.cpp and SWVideoConfig.cpp --- Source/Core/VideoCommon/Src/VideoConfig.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'Source/Core/VideoCommon/Src/VideoConfig.cpp') diff --git a/Source/Core/VideoCommon/Src/VideoConfig.cpp b/Source/Core/VideoCommon/Src/VideoConfig.cpp index 60677ceeeb..25ae6c0af9 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.cpp +++ b/Source/Core/VideoCommon/Src/VideoConfig.cpp @@ -49,7 +49,6 @@ VideoConfig::VideoConfig() void VideoConfig::Load(const char *ini_file) { - std::string temp; IniFile iniFile; iniFile.Load(ini_file); -- cgit v1.2.3 From e5319700523c0639e7a88d7c5ebf6f23f407a3b2 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Fri, 5 Apr 2013 17:13:48 -0400 Subject: Round IR scale down to whole number if using 1.5x/2.5x IR, if game ini specifies -1 for EFBScale. Fixes issue 6210. --- Source/Core/VideoCommon/Src/VideoConfig.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/Src/VideoConfig.cpp') diff --git a/Source/Core/VideoCommon/Src/VideoConfig.cpp b/Source/Core/VideoCommon/Src/VideoConfig.cpp index 25ae6c0af9..6910952d5e 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.cpp +++ b/Source/Core/VideoCommon/Src/VideoConfig.cpp @@ -137,7 +137,26 @@ void VideoConfig::GameIniLoad(const char *ini_file) iniFile.GetIfExists("Video_Settings", "EnablePixelLighting", &bEnablePixelLighting); iniFile.GetIfExists("Video_Settings", "HackedBufferUpload", &bHackedBufferUpload); iniFile.GetIfExists("Video_Settings", "MSAA", &iMultisampleMode); - iniFile.GetIfExists("Video_Settings", "EFBScale", &iEFBScale); // integral + int tmp = 0; + iniFile.GetIfExists("Video_Settings", "EFBScale", &tmp); // integral + if (tmp != -1) + iEFBScale = tmp; + // Round down to multiple of native IR + else + { + switch (iEFBScale) + { + case 3: // 1.5x + iEFBScale = 2; + break; + case 5: // 2.5x + iEFBScale = 4; + break; + default: + break; + } + } + iniFile.GetIfExists("Video_Settings", "DstAlphaPass", &bDstAlphaPass); iniFile.GetIfExists("Video_Settings", "DisableFog", &bDisableFog); iniFile.GetIfExists("Video_Settings", "EnableOpenCL", &bEnableOpenCL); -- cgit v1.2.3 From 6a5a522bba854ee625a90bf84ec88bdbf37674b5 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Fri, 5 Apr 2013 17:20:34 -0400 Subject: Hastily committing untested code without making sure i didn't miss anything first? I would never! --- Source/Core/VideoCommon/Src/VideoConfig.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Core/VideoCommon/Src/VideoConfig.cpp') diff --git a/Source/Core/VideoCommon/Src/VideoConfig.cpp b/Source/Core/VideoCommon/Src/VideoConfig.cpp index 6910952d5e..43fc702eea 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.cpp +++ b/Source/Core/VideoCommon/Src/VideoConfig.cpp @@ -146,6 +146,8 @@ void VideoConfig::GameIniLoad(const char *ini_file) { switch (iEFBScale) { + case 0: + iEFBScale = 1; case 3: // 1.5x iEFBScale = 2; break; -- cgit v1.2.3 From ee163d1e498a81b1665956451fbf784ddbe4fe03 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Fri, 5 Apr 2013 17:26:56 -0400 Subject: Someone take my commit rights away. --- Source/Core/VideoCommon/Src/VideoConfig.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Source/Core/VideoCommon/Src/VideoConfig.cpp') diff --git a/Source/Core/VideoCommon/Src/VideoConfig.cpp b/Source/Core/VideoCommon/Src/VideoConfig.cpp index 43fc702eea..5f10650747 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.cpp +++ b/Source/Core/VideoCommon/Src/VideoConfig.cpp @@ -148,6 +148,7 @@ void VideoConfig::GameIniLoad(const char *ini_file) { case 0: iEFBScale = 1; + break; case 3: // 1.5x iEFBScale = 2; break; -- cgit v1.2.3 From 4d81e0739d2cc7112d5167682fd0750836f691a9 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Sat, 6 Apr 2013 01:48:00 -0400 Subject: Use an enum for efb scale values. --- Source/Core/VideoCommon/Src/VideoConfig.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Source/Core/VideoCommon/Src/VideoConfig.cpp') diff --git a/Source/Core/VideoCommon/Src/VideoConfig.cpp b/Source/Core/VideoCommon/Src/VideoConfig.cpp index 5f10650747..a6139363e6 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.cpp +++ b/Source/Core/VideoCommon/Src/VideoConfig.cpp @@ -79,7 +79,7 @@ void VideoConfig::Load(const char *ini_file) iniFile.Get("Settings", "HackedBufferUpload", &bHackedBufferUpload, 0); iniFile.Get("Settings", "MSAA", &iMultisampleMode, 0); - iniFile.Get("Settings", "EFBScale", &iEFBScale, 2); // native + iniFile.Get("Settings", "EFBScale", &iEFBScale, (int) SCALE_1X); // native iniFile.Get("Settings", "DstAlphaPass", &bDstAlphaPass, false); @@ -139,21 +139,21 @@ void VideoConfig::GameIniLoad(const char *ini_file) iniFile.GetIfExists("Video_Settings", "MSAA", &iMultisampleMode); int tmp = 0; iniFile.GetIfExists("Video_Settings", "EFBScale", &tmp); // integral - if (tmp != -1) + if (tmp != SCALE_FORCE_INTEGRAL) iEFBScale = tmp; // Round down to multiple of native IR else { switch (iEFBScale) { - case 0: - iEFBScale = 1; + case SCALE_AUTO: + iEFBScale = SCALE_AUTO_INTEGRAL; break; - case 3: // 1.5x - iEFBScale = 2; + case SCALE_1_5X: + iEFBScale = SCALE_1X; break; - case 5: // 2.5x - iEFBScale = 4; + case SCALE_2_5X: + iEFBScale = SCALE_2X; break; default: break; -- cgit v1.2.3 From 48f3e962d6e10578813f12b8edfd7b6e06000620 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Mon, 8 Apr 2013 03:05:12 -0400 Subject: Kill me now. Fixes issue 6227. --- Source/Core/VideoCommon/Src/VideoConfig.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/Src/VideoConfig.cpp') diff --git a/Source/Core/VideoCommon/Src/VideoConfig.cpp b/Source/Core/VideoCommon/Src/VideoConfig.cpp index a6139363e6..4b36338c89 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.cpp +++ b/Source/Core/VideoCommon/Src/VideoConfig.cpp @@ -137,9 +137,9 @@ void VideoConfig::GameIniLoad(const char *ini_file) iniFile.GetIfExists("Video_Settings", "EnablePixelLighting", &bEnablePixelLighting); iniFile.GetIfExists("Video_Settings", "HackedBufferUpload", &bHackedBufferUpload); iniFile.GetIfExists("Video_Settings", "MSAA", &iMultisampleMode); - int tmp = 0; + int tmp = -9000; iniFile.GetIfExists("Video_Settings", "EFBScale", &tmp); // integral - if (tmp != SCALE_FORCE_INTEGRAL) + if (tmp != -9000 && tmp != SCALE_FORCE_INTEGRAL) iEFBScale = tmp; // Round down to multiple of native IR else -- cgit v1.2.3 From deece78e19aa59151bc608aabb1cdcb00f734475 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Mon, 8 Apr 2013 03:11:45 -0400 Subject: Seriously, someone kill me. --- Source/Core/VideoCommon/Src/VideoConfig.cpp | 35 ++++++++++++++++------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'Source/Core/VideoCommon/Src/VideoConfig.cpp') diff --git a/Source/Core/VideoCommon/Src/VideoConfig.cpp b/Source/Core/VideoCommon/Src/VideoConfig.cpp index 4b36338c89..ad040b9e24 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.cpp +++ b/Source/Core/VideoCommon/Src/VideoConfig.cpp @@ -139,24 +139,27 @@ void VideoConfig::GameIniLoad(const char *ini_file) iniFile.GetIfExists("Video_Settings", "MSAA", &iMultisampleMode); int tmp = -9000; iniFile.GetIfExists("Video_Settings", "EFBScale", &tmp); // integral - if (tmp != -9000 && tmp != SCALE_FORCE_INTEGRAL) - iEFBScale = tmp; - // Round down to multiple of native IR - else + if (tmp != -9000) { - switch (iEFBScale) + if (tmp != SCALE_FORCE_INTEGRAL) + iEFBScale = tmp; + // Round down to multiple of native IR + else { - case SCALE_AUTO: - iEFBScale = SCALE_AUTO_INTEGRAL; - break; - case SCALE_1_5X: - iEFBScale = SCALE_1X; - break; - case SCALE_2_5X: - iEFBScale = SCALE_2X; - break; - default: - break; + switch (iEFBScale) + { + case SCALE_AUTO: + iEFBScale = SCALE_AUTO_INTEGRAL; + break; + case SCALE_1_5X: + iEFBScale = SCALE_1X; + break; + case SCALE_2_5X: + iEFBScale = SCALE_2X; + break; + default: + break; + } } } -- cgit v1.2.3 From bab9963b00953d60bdd6fabe265d5daa45a27661 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 17 Apr 2013 23:09:55 -0400 Subject: New license header introduced for DiscIO, AudioCommon, InputCommon, VideoCommon, and Common projects. --- Source/Core/VideoCommon/Src/VideoConfig.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'Source/Core/VideoCommon/Src/VideoConfig.cpp') diff --git a/Source/Core/VideoCommon/Src/VideoConfig.cpp b/Source/Core/VideoCommon/Src/VideoConfig.cpp index ad040b9e24..ec95f6efe3 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.cpp +++ b/Source/Core/VideoCommon/Src/VideoConfig.cpp @@ -1,19 +1,6 @@ -// Copyright (C) 2003 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ +// Copyright 2013 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. #include -- cgit v1.2.3 From 8da425b008b46ef90d649e55c6c0d4a0bc2b556b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 24 Apr 2013 09:21:54 -0400 Subject: Formatting cleanup for VideoCommon. Block braces on new lines. Also killed off trailing whitespace and dangling elses. Spaced some things out to make them more readable (only in places where it looked like a bit of a clusterfuck). --- Source/Core/VideoCommon/Src/VideoConfig.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/Src/VideoConfig.cpp') diff --git a/Source/Core/VideoCommon/Src/VideoConfig.cpp b/Source/Core/VideoCommon/Src/VideoConfig.cpp index ec95f6efe3..0b70b5440f 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.cpp +++ b/Source/Core/VideoCommon/Src/VideoConfig.cpp @@ -129,9 +129,10 @@ void VideoConfig::GameIniLoad(const char *ini_file) if (tmp != -9000) { if (tmp != SCALE_FORCE_INTEGRAL) + { iEFBScale = tmp; - // Round down to multiple of native IR - else + } + else // Round down to multiple of native IR { switch (iEFBScale) { -- cgit v1.2.3