diff options
| author | Matthew Parlane <parlane@gmail.com> | 2012-12-24 12:58:15 +1300 |
|---|---|---|
| committer | Matthew Parlane <parlane@gmail.com> | 2012-12-24 12:58:15 +1300 |
| commit | f6418bd09357a528bc495f6854512586d76f28c6 (patch) | |
| tree | ce7748e276363190022f766f4e2d3664712f7c58 /Source/Core/Common | |
| parent | d9dd94ac8b696ceb0e6b32eaafcc302b41f43bd1 (diff) | |
| parent | eedca572702c7416805375bd652c56af8665d167 (diff) | |
Merge branch 'master' into wii-usb
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Src/CPUDetect.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/Common/Src/ColorUtil.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/Common/Src/CommonPaths.h | 1 | ||||
| -rw-r--r-- | Source/Core/Common/Src/DebugInterface.h | 2 | ||||
| -rw-r--r-- | Source/Core/Common/Src/FileUtil.cpp | 12 | ||||
| -rw-r--r-- | Source/Core/Common/Src/Setup.h | 41 | ||||
| -rw-r--r-- | Source/Core/Common/Src/Thread.cpp | 1 | ||||
| -rw-r--r-- | Source/Core/Common/Src/Timer.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/Common/Src/Timer.h | 1 | ||||
| -rw-r--r-- | Source/Core/Common/Src/VideoBackendBase.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/Common/Src/x64Analyzer.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/Common/Src/x64Emitter.cpp | 2 |
12 files changed, 13 insertions, 65 deletions
diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp index 93e9d25087..65cd6dbd0b 100644 --- a/Source/Core/Common/Src/CPUDetect.cpp +++ b/Source/Core/Common/Src/CPUDetect.cpp @@ -173,9 +173,7 @@ void CPUInfo::Detect() if (max_ex_fn >= 0x80000001) { // Check for more features. __cpuid(cpu_id, 0x80000001); - bool cmp_legacy = false; if (cpu_id[2] & 1) bLAHFSAHF64 = true; - if (cpu_id[2] & 2) cmp_legacy = true; //wtf is this? if ((cpu_id[3] >> 29) & 1) bLongMode = true; } diff --git a/Source/Core/Common/Src/ColorUtil.cpp b/Source/Core/Common/Src/ColorUtil.cpp index 5e5143549a..52ffec0803 100644 --- a/Source/Core/Common/Src/ColorUtil.cpp +++ b/Source/Core/Common/Src/ColorUtil.cpp @@ -31,7 +31,7 @@ const int lut3to8[] = { 0x00,0x24,0x48,0x6D,0x91,0xB6,0xDA,0xFF }; u32 Decode5A3(u16 val) { - const u32 bg_color = 0xFFFFFFFF; + const u32 bg_color = 0x00000000; int r, g, b, a; diff --git a/Source/Core/Common/Src/CommonPaths.h b/Source/Core/Common/Src/CommonPaths.h index decf2aef97..430a0c0cd8 100644 --- a/Source/Core/Common/Src/CommonPaths.h +++ b/Source/Core/Common/Src/CommonPaths.h @@ -128,6 +128,7 @@ #define WII_EUR_SETTING "setting-eur.txt" #define WII_USA_SETTING "setting-usa.txt" #define WII_JAP_SETTING "setting-jpn.txt" +#define WII_KOR_SETTING "setting-kor.txt" #define GECKO_CODE_HANDLER "codehandler.bin" diff --git a/Source/Core/Common/Src/DebugInterface.h b/Source/Core/Common/Src/DebugInterface.h index 15c58e4f57..317cd0bb43 100644 --- a/Source/Core/Common/Src/DebugInterface.h +++ b/Source/Core/Common/Src/DebugInterface.h @@ -30,7 +30,7 @@ public: virtual void step() {} virtual void runToBreakpoint() {} virtual void breakNow() {} - virtual void insertBLR(unsigned int /*address*/, unsigned int) {} + virtual void insertBLR(unsigned int /*address*/, unsigned int /*value*/) {} virtual void showJitResults(unsigned int /*address*/) {}; virtual int getColor(unsigned int /*address*/){return 0xFFFFFFFF;} virtual std::string getDescription(unsigned int /*address*/) = 0; diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index 4650c6e1ba..77aac45418 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -299,7 +299,7 @@ bool Copy(const std::string &srcFilename, const std::string &destFilename) ERROR_LOG(COMMON, "Copy: failed reading from source, %s --> %s: %s", srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); - return false; + goto bail; } } @@ -310,13 +310,19 @@ bool Copy(const std::string &srcFilename, const std::string &destFilename) ERROR_LOG(COMMON, "Copy: failed writing to output, %s --> %s: %s", srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); - return false; + goto bail; } } // close flushs fclose(input); fclose(output); return true; +bail: + if (input) + fclose(input); + if (output) + fclose(output); + return false; #endif } @@ -649,7 +655,7 @@ std::string &GetUserPath(const unsigned int DirIDX, const std::string &newPath) if (File::Exists(ROOT_DIR DIR_SEP USERDATA_DIR)) paths[D_USER_IDX] = ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP; else - paths[D_USER_IDX] = std::string(getenv("HOME")) + DIR_SEP DOLPHIN_DATA_DIR DIR_SEP; + paths[D_USER_IDX] = std::string(getenv("HOME") ? getenv("HOME") : getenv("PWD")) + DIR_SEP DOLPHIN_DATA_DIR DIR_SEP; #endif INFO_LOG(COMMON, "GetUserPath: Setting user directory to %s:", paths[D_USER_IDX].c_str()); diff --git a/Source/Core/Common/Src/Setup.h b/Source/Core/Common/Src/Setup.h deleted file mode 100644 index c0faec3059..0000000000 --- a/Source/Core/Common/Src/Setup.h +++ /dev/null @@ -1,41 +0,0 @@ -// 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/ - -#ifndef _SETUP_H_ -#define _SETUP_H_ - -// ----------------------------------------------------------------------------------------------------- -// File description: -// Compilation settings. I avoid placing this in Common.h or some place where lots of files needs -// to be rebuilt if any of these settings are changed. I'd rather have it in as few files as possible. -// This file can be kept on the ignore list in your SVN program. It allows local optional settings -// depending on what works on your computer. -// ----------------------------------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------------------------------- -// Settings: - -// This may remove sound artifacts in Wario Land Shake It and perhaps other games -//#define SETUP_AVOID_SOUND_ARTIFACTS - -// Build with playback rerecording options -//#define RERECORDING - -// ----------------------------------------------------------------------------------------------------- - -#endif // _SETUP_H_ - diff --git a/Source/Core/Common/Src/Thread.cpp b/Source/Core/Common/Src/Thread.cpp index ce91aac651..73f83c204f 100644 --- a/Source/Core/Common/Src/Thread.cpp +++ b/Source/Core/Common/Src/Thread.cpp @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "Setup.h" #include "Thread.h" #include "Common.h" diff --git a/Source/Core/Common/Src/Timer.cpp b/Source/Core/Common/Src/Timer.cpp index 087f8fcead..b1beed2066 100644 --- a/Source/Core/Common/Src/Timer.cpp +++ b/Source/Core/Common/Src/Timer.cpp @@ -97,12 +97,6 @@ void Timer::AddTimeDifference() m_StartTime += GetTimeDifference(); } -// Wind back the starting time to a custom time -void Timer::WindBackStartingTime(u64 WindBack) -{ - m_StartTime += WindBack; -} - // Get the time elapsed since the Start() u64 Timer::GetTimeElapsed() { diff --git a/Source/Core/Common/Src/Timer.h b/Source/Core/Common/Src/Timer.h index a638920409..152d4c60e6 100644 --- a/Source/Core/Common/Src/Timer.h +++ b/Source/Core/Common/Src/Timer.h @@ -35,7 +35,6 @@ public: // The time difference is always returned in milliseconds, regardless of alternative internal representation u64 GetTimeDifference(); void AddTimeDifference(); - void WindBackStartingTime(u64 WindBack); static void IncreaseResolution(); static void RestoreResolution(); diff --git a/Source/Core/Common/Src/VideoBackendBase.cpp b/Source/Core/Common/Src/VideoBackendBase.cpp index 339cb016c1..40bb0fc4ce 100644 --- a/Source/Core/Common/Src/VideoBackendBase.cpp +++ b/Source/Core/Common/Src/VideoBackendBase.cpp @@ -41,7 +41,7 @@ static bool IsGteVista() VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL); - return VerifyVersionInfo(&osvi, VER_MAJORVERSION, dwlConditionMask); + return VerifyVersionInfo(&osvi, VER_MAJORVERSION, dwlConditionMask) != FALSE; } #endif diff --git a/Source/Core/Common/Src/x64Analyzer.cpp b/Source/Core/Common/Src/x64Analyzer.cpp index 2ea3e9a512..66a2fe217f 100644 --- a/Source/Core/Common/Src/x64Analyzer.cpp +++ b/Source/Core/Common/Src/x64Analyzer.cpp @@ -31,12 +31,9 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int acc info.hasImmediate = false; info.isMemoryWrite = false; - int addressSize = 8; u8 modRMbyte = 0; u8 sibByte = 0; bool hasModRM = false; - bool hasSIBbyte = false; - bool hasDisplacement = false; int displacementSize = 0; @@ -47,7 +44,6 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int acc } else if (*codePtr == 0x67) { - addressSize = 4; codePtr++; } @@ -113,7 +109,6 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int acc info.otherReg = (sibByte & 7); if (rex & 2) info.scaledReg += 8; if (rex & 1) info.otherReg += 8; - hasSIBbyte = true; } else { @@ -122,7 +117,6 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int acc } if (mrm.mod == 1 || mrm.mod == 2) { - hasDisplacement = true; if (mrm.mod == 1) displacementSize = 1; else diff --git a/Source/Core/Common/Src/x64Emitter.cpp b/Source/Core/Common/Src/x64Emitter.cpp index d4bd1adabf..19e96478d1 100644 --- a/Source/Core/Common/Src/x64Emitter.cpp +++ b/Source/Core/Common/Src/x64Emitter.cpp @@ -870,7 +870,6 @@ void XEmitter::BTC(int bits, OpArg dest, OpArg index) {WriteBitTest(bits, dest, //shift can be either imm8 or cl void XEmitter::SHRD(int bits, OpArg dest, OpArg src, OpArg shift) { - bool writeImm = false; if (dest.IsImm()) { _assert_msg_(DYNA_REC, 0, "SHRD - can't use imms as destination"); @@ -901,7 +900,6 @@ void XEmitter::SHRD(int bits, OpArg dest, OpArg src, OpArg shift) void XEmitter::SHLD(int bits, OpArg dest, OpArg src, OpArg shift) { - bool writeImm = false; if (dest.IsImm()) { _assert_msg_(DYNA_REC, 0, "SHLD - can't use imms as destination"); |
