From d180e4469ee200494b4c78b448c1984dfdfbecff Mon Sep 17 00:00:00 2001 From: comex Date: Sun, 21 Jun 2015 13:29:04 -0400 Subject: [PATCH 1/3] Disable warnings for wx headers ...by telling CMake to use -isystem for the static wx include directory. AFAICT, this is already done by CMake's FindwxWidgets script in the shared case. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f1ad0fb67..a8fc1f0ae7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -781,7 +781,7 @@ if(NOT DISABLE_WX AND NOT ANDROID) message(FATAL_ERROR "wxWidgets in Externals is not compatible with your platform") endif() - include_directories( + include_directories(SYSTEM Externals/wxWidgets3 Externals/wxWidgets3/include) add_subdirectory(Externals/wxWidgets3) From 700b850acdb4895a6f70942d1470e998d76819c1 Mon Sep 17 00:00:00 2001 From: comex Date: Sun, 21 Jun 2015 15:28:49 -0400 Subject: [PATCH 2/3] Fix misc. clang warnings - mostly complaints about inconsistent use of override. Previously, MacOpenFile only overrode anything on OS X; otherwise it was just a useless method, which is presumably why it wasn't marked override in the first place. Address this more sanely by wrapping it in #ifdef __APPLE__. --- Source/Core/DolphinWX/ControllerConfigDiag.cpp | 4 ++-- Source/Core/DolphinWX/Main.cpp | 2 ++ Source/Core/DolphinWX/Main.h | 4 +++- .../Core/InputCommon/ControllerInterface/OSX/OSXKeyboard.h | 6 +++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Source/Core/DolphinWX/ControllerConfigDiag.cpp b/Source/Core/DolphinWX/ControllerConfigDiag.cpp index 07b803b677..ab5e220764 100644 --- a/Source/Core/DolphinWX/ControllerConfigDiag.cpp +++ b/Source/Core/DolphinWX/ControllerConfigDiag.cpp @@ -43,7 +43,7 @@ wxDEFINE_EVENT(wxEVT_ADAPTER_UPDATE, wxCommandEvent); ControllerConfigDiag::ControllerConfigDiag(wxWindow* const parent) : wxDialog(parent, wxID_ANY, _("Dolphin Controller Configuration")) { - m_gc_pad_type_strs = { + m_gc_pad_type_strs = {{ _("None"), _("Standard Controller"), _("Steering Wheel"), @@ -52,7 +52,7 @@ ControllerConfigDiag::ControllerConfigDiag(wxWindow* const parent) _("GBA"), _("Keyboard"), _("AM-Baseboard") - }; + }}; wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL); diff --git a/Source/Core/DolphinWX/Main.cpp b/Source/Core/DolphinWX/Main.cpp index 64912416d8..b852460d66 100644 --- a/Source/Core/DolphinWX/Main.cpp +++ b/Source/Core/DolphinWX/Main.cpp @@ -276,12 +276,14 @@ bool DolphinApp::OnInit() return true; } +#ifdef __APPLE__ void DolphinApp::MacOpenFile(const wxString &fileName) { FileToLoad = fileName; LoadFile = true; main_frame->BootGame(WxStrToStr(FileToLoad)); } +#endif void DolphinApp::AfterInit() { diff --git a/Source/Core/DolphinWX/Main.h b/Source/Core/DolphinWX/Main.h index ade8f81287..a28b3e94f9 100644 --- a/Source/Core/DolphinWX/Main.h +++ b/Source/Core/DolphinWX/Main.h @@ -23,7 +23,9 @@ private: void OnFatalException() override; bool Initialize(int& c, wxChar **v) override; void InitLanguageSupport(); - void MacOpenFile(const wxString &fileName); +#ifdef __APPLE__ + void MacOpenFile(const wxString &fileName) override; +#endif bool BatchMode; bool LoadFile; diff --git a/Source/Core/InputCommon/ControllerInterface/OSX/OSXKeyboard.h b/Source/Core/InputCommon/ControllerInterface/OSX/OSXKeyboard.h index 973bd1fefd..4be67a503c 100644 --- a/Source/Core/InputCommon/ControllerInterface/OSX/OSXKeyboard.h +++ b/Source/Core/InputCommon/ControllerInterface/OSX/OSXKeyboard.h @@ -57,9 +57,9 @@ public: Keyboard(IOHIDDeviceRef device, std::string name, int index, void *window); - std::string GetName() const; - std::string GetSource() const; - int GetId() const; + std::string GetName() const override; + std::string GetSource() const override; + int GetId() const override; private: struct From 4b060891032bf0d158fb9b2a91a82c45f1fd223f Mon Sep 17 00:00:00 2001 From: comex Date: Sun, 21 Jun 2015 15:36:57 -0400 Subject: [PATCH 3/3] Fix linking to libav in non-default path LIBAV_LDFLAGS has -L, LIBAV_LIBRARIES is just the names of the I think this is not necessary for other dependencies because they consist of a single library and go through a different path (check_lib) that provides the full path to it. e.g. from my CMakeCache.txt: ICONV_LIBRARIES:FILEPATH=/usr/lib/libiconv.dylib (good) LIBAV_LIBRARIES:INTERNAL=avcodec;avformat;swscale;avutil (bad) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a8fc1f0ae7..f7afb60cee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -469,7 +469,7 @@ if(NOT ANDROID) if(ENCODE_FRAMEDUMPS) check_libav() if(LIBAV_FOUND) - LIST(APPEND LIBS ${LIBAV_LIBRARIES}) + LIST(APPEND LIBS ${LIBAV_LDFLAGS}) endif() endif()