Fix GCC 4.5 Compiling. -fvisibility=hidden seems to break it, so it was removed. Non-POD objects are now errors instead of warnings in 4.5, so I had to remove the wxString::Format. and a Fix where GCC 4.5 introduced strndup. Compiling with nowx=true gave me linker problems for some reason, and I added the -flto flag but commented out. Dunno what it will do yet.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4530 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
e4ec0ba33b
commit
ebc696c58e
|
@ -31,10 +31,9 @@ compileFlags = [
|
||||||
'-fno-exceptions',
|
'-fno-exceptions',
|
||||||
'-fno-strict-aliasing',
|
'-fno-strict-aliasing',
|
||||||
'-msse2',
|
'-msse2',
|
||||||
#'-fomit-frame-pointer'
|
# '-fomit-frame-pointer',
|
||||||
|
# '-flto',
|
||||||
]
|
]
|
||||||
if sys.platform != 'win32':
|
|
||||||
compileFlags += [ '-fvisibility=hidden' ]
|
|
||||||
|
|
||||||
cppDefines = [
|
cppDefines = [
|
||||||
( '_FILE_OFFSET_BITS', 64),
|
( '_FILE_OFFSET_BITS', 64),
|
||||||
|
|
|
@ -45,7 +45,7 @@ size_t strnlen(const char *s, size_t n)
|
||||||
return(p ? p-s : n);
|
return(p ? p-s : n);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_WIN32) || !(__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
|
||||||
// strdup with cropping after size n
|
// strdup with cropping after size n
|
||||||
char* strndup(char const *s, size_t n)
|
char* strndup(char const *s, size_t n)
|
||||||
{
|
{
|
||||||
|
@ -58,3 +58,4 @@ char* strndup(char const *s, size_t n)
|
||||||
dup[len] = '\0';
|
dup[len] = '\0';
|
||||||
return (char *)memcpy(dup, s, len);
|
return (char *)memcpy(dup, s, len);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -747,9 +747,11 @@ void CGameListCtrl::OnMouseMotion(wxMouseEvent& event)
|
||||||
|
|
||||||
// Show a tooltip containing the EmuState and the state description
|
// Show a tooltip containing the EmuState and the state description
|
||||||
if (nState > 0 && nState < 6)
|
if (nState > 0 && nState < 6)
|
||||||
toolTip = new wxEmuStateTip(this, wxString::Format(wxT(" ^ %s%s%s"),
|
{
|
||||||
wxString::FromAscii(emuState[nState - 1].c_str()), issues.size() > 0 ? wxT(" :\n") : wxT(""),
|
char temp[2048];
|
||||||
wxString::FromAscii(issues.c_str())), &toolTip);
|
sprintf(temp, "^ %s%s%s", emuState[nState -1].c_str(), issues.size() > 0 ? " :\n" : "", issues.c_str());
|
||||||
|
toolTip = new wxEmuStateTip(this, wxString::FromAscii(temp), &toolTip);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
toolTip = new wxEmuStateTip(this, wxT("Not Set"), &toolTip);
|
toolTip = new wxEmuStateTip(this, wxT("Not Set"), &toolTip);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#include "EventHandler.h"
|
#include "EventHandler.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
#if defined HAVE_WX && HAVE_WX
|
#if defined HAVE_WX && HAVE_WX
|
||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
|
|
|
@ -230,10 +230,13 @@ void X11AddResolutions() {
|
||||||
{
|
{
|
||||||
char temp[32];
|
char temp[32];
|
||||||
sprintf(temp,"%dx%d", modes[i]->hdisplay, modes[i]->vdisplay);
|
sprintf(temp,"%dx%d", modes[i]->hdisplay, modes[i]->vdisplay);
|
||||||
|
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
m_ConfigFrame->AddFSReso(temp);
|
m_ConfigFrame->AddFSReso(temp);
|
||||||
m_ConfigFrame->AddWindowReso(temp);//Add same to Window ones,
|
m_ConfigFrame->AddWindowReso(temp);//Add same to Window ones,
|
||||||
//since they should be
|
//since they should be
|
||||||
//nearly all that's needed
|
//nearly all that's needed
|
||||||
|
#endif
|
||||||
px = modes[i]->hdisplay;//Used to remove repeating from
|
px = modes[i]->hdisplay;//Used to remove repeating from
|
||||||
//different screen depths
|
//different screen depths
|
||||||
py = modes[i]->vdisplay;
|
py = modes[i]->vdisplay;
|
||||||
|
|
Loading…
Reference in New Issue