summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorMatthew Parlane <parlane@gmail.com>2012-12-29 17:47:52 +1300
committerMatthew Parlane <parlane@gmail.com>2012-12-29 17:47:52 +1300
commit13bd235c1174f1291fedbf73f6bfd01c4dd81994 (patch)
tree497e9a760a94efb6a69bee0a60bb1b8735152e32 /Source/Core/Common
parentde0798f4f7fb0d4010567351e34f658ab51348ef (diff)
parente9d00bfeebb62d8b6c5627b959c9045914348775 (diff)
Merge branch 'master' into wii-usb
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/Src/ChunkFile.h2
-rw-r--r--Source/Core/Common/Src/Common.h5
-rw-r--r--Source/Core/Common/Src/FileUtil.cpp3
-rw-r--r--Source/Core/Common/Src/MathUtil.h2
-rw-r--r--Source/Core/Common/Src/VideoBackendBase.cpp4
-rw-r--r--Source/Core/Common/Src/VideoBackendBase.h8
6 files changed, 16 insertions, 8 deletions
diff --git a/Source/Core/Common/Src/ChunkFile.h b/Source/Core/Common/Src/ChunkFile.h
index 5935b7f53a..be8b49a3a3 100644
--- a/Source/Core/Common/Src/ChunkFile.h
+++ b/Source/Core/Common/Src/ChunkFile.h
@@ -158,7 +158,7 @@ public:
case MODE_READ: x = (wchar_t*)*ptr; break;
case MODE_WRITE: memcpy(*ptr, x.c_str(), stringLen); break;
case MODE_MEASURE: break;
- case MODE_VERIFY: _dbg_assert_msg_(COMMON, x == (wchar_t*)*ptr, "Savestate verification failure: \"%s\" != \"%s\" (at %p).\n", x.c_str(), (wchar_t*)*ptr, ptr); break;
+ case MODE_VERIFY: _dbg_assert_msg_(COMMON, x == (wchar_t*)*ptr, "Savestate verification failure: \"%ls\" != \"%ls\" (at %p).\n", x.c_str(), (wchar_t*)*ptr, ptr); break;
}
(*ptr) += stringLen;
}
diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h
index 960bf75559..884a1e6c16 100644
--- a/Source/Core/Common/Src/Common.h
+++ b/Source/Core/Common/Src/Common.h
@@ -60,11 +60,6 @@ private:
#undef STACKALIGN
#define STACKALIGN __attribute__((__force_align_arg_pointer__))
#endif
-// We use wxWidgets on OS X only if it is version 2.9+ with Cocoa support.
-#ifdef __WXOSX_COCOA__
-#define HAVE_WX 1
-#define USE_WX 1 // Use wxGLCanvas
-#endif
#elif defined _WIN32
diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp
index 77aac45418..77290528a6 100644
--- a/Source/Core/Common/Src/FileUtil.cpp
+++ b/Source/Core/Common/Src/FileUtil.cpp
@@ -649,8 +649,7 @@ std::string &GetUserPath(const unsigned int DirIDX, const std::string &newPath)
if (paths[D_USER_IDX].empty())
{
#ifdef _WIN32
- // TODO: use GetExeDirectory() here instead of ROOT_DIR so that if the cwd is changed we still have the correct paths?
- paths[D_USER_IDX] = ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP;
+ paths[D_USER_IDX] = GetExeDirectory() + DIR_SEP USERDATA_DIR DIR_SEP;
#else
if (File::Exists(ROOT_DIR DIR_SEP USERDATA_DIR))
paths[D_USER_IDX] = ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP;
diff --git a/Source/Core/Common/Src/MathUtil.h b/Source/Core/Common/Src/MathUtil.h
index a6290ff602..c5f613ada1 100644
--- a/Source/Core/Common/Src/MathUtil.h
+++ b/Source/Core/Common/Src/MathUtil.h
@@ -117,6 +117,8 @@ struct Rectangle
Rectangle(T theLeft, T theTop, T theRight, T theBottom)
: left(theLeft), top(theTop), right(theRight), bottom(theBottom)
{ }
+
+ bool operator==(const Rectangle& r) { return left==r.left && top==r.top && right==r.right && bottom==r.bottom; }
T GetWidth() const { return abs(right - left); }
T GetHeight() const { return abs(bottom - top); }
diff --git a/Source/Core/Common/Src/VideoBackendBase.cpp b/Source/Core/Common/Src/VideoBackendBase.cpp
index 40bb0fc4ce..62bb42997f 100644
--- a/Source/Core/Common/Src/VideoBackendBase.cpp
+++ b/Source/Core/Common/Src/VideoBackendBase.cpp
@@ -22,7 +22,9 @@
#include "../../../Plugins/Plugin_VideoDX9/Src/VideoBackend.h"
#include "../../../Plugins/Plugin_VideoDX11/Src/VideoBackend.h"
#endif
+#ifndef USE_GLES
#include "../../../Plugins/Plugin_VideoOGL/Src/VideoBackend.h"
+#endif
#include "../../../Plugins/Plugin_VideoSoftware/Src/VideoBackend.h"
std::vector<VideoBackend*> g_available_video_backends;
@@ -52,7 +54,9 @@ void VideoBackend::PopulateList()
if (IsGteVista())
g_available_video_backends.push_back(new DX11::VideoBackend);
#endif
+#ifndef USE_GLES
g_available_video_backends.push_back(new OGL::VideoBackend);
+#endif
g_available_video_backends.push_back(new SW::VideoSoftware);
g_video_backend = g_available_video_backends.front();
diff --git a/Source/Core/Common/Src/VideoBackendBase.h b/Source/Core/Common/Src/VideoBackendBase.h
index d09288ebc7..311fa66104 100644
--- a/Source/Core/Common/Src/VideoBackendBase.h
+++ b/Source/Core/Common/Src/VideoBackendBase.h
@@ -137,6 +137,8 @@ public:
// the implementation needs not do synchronization logic, because calls to it are surrounded by PauseAndLock now
virtual void DoState(PointerWrap &p) = 0;
+
+ virtual void CheckInvalidState() = 0;
};
extern std::vector<VideoBackend*> g_available_video_backends;
@@ -176,9 +178,15 @@ class VideoBackendHardware : public VideoBackend
void PauseAndLock(bool doLock, bool unpauseOnUnlock=true);
void DoState(PointerWrap &p);
+
+ bool m_invalid;
+
+public:
+ void CheckInvalidState();
protected:
void InitializeShared();
+ void InvalidState();
};
#endif