mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Merge branch 'master' into wii-usb
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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); }
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user