summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorSonicadvance1 <sonicadvance1@gmail.com>2009-11-11 11:07:04 +0000
committerSonicadvance1 <sonicadvance1@gmail.com>2009-11-11 11:07:04 +0000
commitebc696c58e21e2657c03801bb5f9bb7cd65e6e40 (patch)
tree891705bf29f53b2ffcf0c2d1d93186800025b8ed /Source/Core
parente4ec0ba33b4b3083ff0e94c1ca1135e35b45a32f (diff)
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
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/Src/Misc.cpp3
-rw-r--r--Source/Core/DolphinWX/Src/GameListCtrl.cpp8
-rw-r--r--Source/Core/InputCommon/Src/EventHandler.cpp2
3 files changed, 9 insertions, 4 deletions
diff --git a/Source/Core/Common/Src/Misc.cpp b/Source/Core/Common/Src/Misc.cpp
index 5541ccadf9..bac52095a7 100644
--- a/Source/Core/Common/Src/Misc.cpp
+++ b/Source/Core/Common/Src/Misc.cpp
@@ -45,7 +45,7 @@ size_t strnlen(const char *s, size_t n)
return(p ? p-s : n);
}
#endif
-
+#if defined(_WIN32) || !(__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
// strdup with cropping after size n
char* strndup(char const *s, size_t n)
{
@@ -58,3 +58,4 @@ char* strndup(char const *s, size_t n)
dup[len] = '\0';
return (char *)memcpy(dup, s, len);
}
+#endif
diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp
index e51fd12a02..55ce02413e 100644
--- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp
+++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp
@@ -747,9 +747,11 @@ void CGameListCtrl::OnMouseMotion(wxMouseEvent& event)
// Show a tooltip containing the EmuState and the state description
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(""),
- wxString::FromAscii(issues.c_str())), &toolTip);
+ {
+ char temp[2048];
+ 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
toolTip = new wxEmuStateTip(this, wxT("Not Set"), &toolTip);
diff --git a/Source/Core/InputCommon/Src/EventHandler.cpp b/Source/Core/InputCommon/Src/EventHandler.cpp
index 4f78a56963..81890202db 100644
--- a/Source/Core/InputCommon/Src/EventHandler.cpp
+++ b/Source/Core/InputCommon/Src/EventHandler.cpp
@@ -1,4 +1,6 @@
#include "EventHandler.h"
+#include <stdio.h>
+#include <ctype.h>
#if defined HAVE_WX && HAVE_WX
#include <wx/wx.h>