mirror of https://github.com/PCSX2/pcsx2.git
pcsx2|utilities; Revert ambiguous wxString related commits
This reverts93d5b52df3
f3e78b8267
55155ca7f1
. Unfortunately wxString stuff is a PITA to deal with. Breaks FreeBSD compile, but there are probably more issues that just haven't been reported yet...
This commit is contained in:
parent
d520f3852b
commit
a977f1e6c1
|
@ -185,6 +185,9 @@ extern pxDoAssertFnType *pxDoAssert;
|
|||
#define IndexBoundsAssumeDev(objname, idx, sze) pxAssumeDev((uint)(idx) < (uint)(sze), \
|
||||
pxsFmt(L"Array index out of bounds accessing object '%s' (index=%d, size=%d)", objname, (idx), (sze)))
|
||||
|
||||
|
||||
extern void pxOnAssert(const DiagnosticOrigin &origin, const wxChar *msg = NULL);
|
||||
extern void pxOnAssert(const DiagnosticOrigin &origin, const char *msg);
|
||||
extern void pxOnAssert(const DiagnosticOrigin &origin, const wxString &msg);
|
||||
extern void pxOnAssert(const DiagnosticOrigin &origin, const FastFormatUnicode &msg);
|
||||
|
||||
|
|
|
@ -200,7 +200,6 @@ protected:
|
|||
void _ThreadCleanup();
|
||||
|
||||
static void *_internal_callback(void *func);
|
||||
static void internal_callback_helper(void *func);
|
||||
static void _pt_callback_cleanup(void *handle);
|
||||
};
|
||||
|
||||
|
|
|
@ -680,7 +680,8 @@ protected:
|
|||
wxPoint m_curpos;
|
||||
int m_leading;
|
||||
|
||||
virtual void _DoWriteLn(const wxString &msg);
|
||||
virtual void _DoWriteLn(const wxChar *msg);
|
||||
void _DoWriteLn(const wxString msg);
|
||||
void _DoWrite(const wxChar *msg);
|
||||
|
||||
public:
|
||||
|
|
|
@ -95,7 +95,7 @@ bool pxAssertImpl_LogIt(const DiagnosticOrigin &origin, const wxChar *msg)
|
|||
}
|
||||
|
||||
|
||||
DEVASSERT_INLINE void pxOnAssert(const DiagnosticOrigin &origin, const wxString &msg)
|
||||
DEVASSERT_INLINE void pxOnAssert(const DiagnosticOrigin &origin, const wxChar *msg)
|
||||
{
|
||||
// Recursion guard: Allow at least one recursive call. This is useful because sometimes
|
||||
// we get meaningless assertions while unwinding stack traces after exceptions have occurred.
|
||||
|
@ -114,9 +114,9 @@ DEVASSERT_INLINE void pxOnAssert(const DiagnosticOrigin &origin, const wxString
|
|||
|
||||
if (pxDoAssert == NULL) {
|
||||
// Note: Format uses MSVC's syntax for output window hotlinking.
|
||||
trapit = pxAssertImpl_LogIt(origin, msg.wc_str());
|
||||
trapit = pxAssertImpl_LogIt(origin, msg);
|
||||
} else {
|
||||
trapit = pxDoAssert(origin, msg.wc_str());
|
||||
trapit = pxDoAssert(origin, msg);
|
||||
}
|
||||
|
||||
if (trapit) {
|
||||
|
@ -124,6 +124,16 @@ DEVASSERT_INLINE void pxOnAssert(const DiagnosticOrigin &origin, const wxString
|
|||
}
|
||||
}
|
||||
|
||||
__fi void pxOnAssert(const DiagnosticOrigin &origin, const char *msg)
|
||||
{
|
||||
pxOnAssert(origin, fromUTF8(msg));
|
||||
}
|
||||
|
||||
__fi void pxOnAssert(const DiagnosticOrigin &origin, const wxString &msg)
|
||||
{
|
||||
pxOnAssert(origin, msg.wc_str());
|
||||
}
|
||||
|
||||
__fi void pxOnAssert(const DiagnosticOrigin &origin, const FastFormatUnicode &msg)
|
||||
{
|
||||
pxOnAssert(origin, msg.c_str());
|
||||
|
|
|
@ -685,21 +685,12 @@ void *Threading::pxThread::_internal_callback(void *itsme)
|
|||
{
|
||||
if (!pxAssertDev(itsme != NULL, wxNullChar))
|
||||
return NULL;
|
||||
|
||||
internal_callback_helper(itsme);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// __try is used in pthread_cleanup_push when CLEANUP_SEH is used as the cleanup model.
|
||||
// That can't be used in a function that has objects that require unwinding (compile
|
||||
// error C2712), so move it into a separate function.
|
||||
void Threading::pxThread::internal_callback_helper(void *itsme)
|
||||
{
|
||||
pxThread &owner = *static_cast<pxThread *>(itsme);
|
||||
pxThread &owner = *((pxThread *)itsme);
|
||||
|
||||
pthread_cleanup_push(_pt_callback_cleanup, itsme);
|
||||
owner._internal_execute();
|
||||
pthread_cleanup_pop(true);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Threading::pxThread::_DoSetThreadName(const wxString &name)
|
||||
|
|
|
@ -84,7 +84,7 @@ pxWindowTextWriter &pxWindowTextWriter::MoveY(int ydelta)
|
|||
return *this;
|
||||
}
|
||||
|
||||
void pxWindowTextWriter::_DoWriteLn(const wxString &msg)
|
||||
void pxWindowTextWriter::_DoWriteLn(const wxChar *msg)
|
||||
{
|
||||
pxAssert(msg);
|
||||
|
||||
|
@ -103,6 +103,11 @@ void pxWindowTextWriter::_DoWriteLn(const wxString &msg)
|
|||
m_curpos.y += tHeight + m_leading;
|
||||
}
|
||||
|
||||
void pxWindowTextWriter::_DoWriteLn(const wxString msg)
|
||||
{
|
||||
_DoWriteLn(msg.wc_str());
|
||||
}
|
||||
|
||||
// Splits incoming multi-line strings into pieces, and dispatches each line individually
|
||||
// to the text writer.
|
||||
void pxWindowTextWriter::_DoWrite(const wxChar *msg)
|
||||
|
|
|
@ -227,7 +227,7 @@ public:
|
|||
|
||||
ConsoleLogFromVM( const TraceLogDescriptor* desc ) : _parent( desc ) {}
|
||||
|
||||
bool Write( const wxString &msg ) const
|
||||
bool Write( const wxChar* msg ) const
|
||||
{
|
||||
ConsoleColorScope cs(conColor);
|
||||
Console.WriteRaw( msg );
|
||||
|
@ -239,6 +239,12 @@ public:
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Write( const wxString msg ) const
|
||||
{
|
||||
return Write(msg.wc_str());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue