diff --git a/CMakeLists.txt b/CMakeLists.txt index 42d44d87f9..f5c3612ea9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -212,6 +212,7 @@ include_directories(Source/Core/DSPCore/Src) include_directories(Source/Core/InputCommon/Src) include_directories(Source/Core/InputUICommon/Src) include_directories(Source/Core/VideoCommon/Src) +include_directories(Source/Core/VideoUICommon/Src) include_directories(Source/Core/wiiuse/Src) diff --git a/SConstruct b/SConstruct index a7caef8dd7..9502cf0e20 100644 --- a/SConstruct +++ b/SConstruct @@ -358,6 +358,7 @@ dirs = [ 'Source/Core/InputCommon/Src', 'Source/Core/InputUICommon/Src', 'Source/Core/VideoCommon/Src', + 'Source/Core/VideoUICommon/Src', 'Source/Core/wiiuse/Src', 'Source/DSPTool/Src', 'Source/Plugins/Plugin_DSP_HLE/Src', diff --git a/Source/Core/CMakeLists.txt b/Source/Core/CMakeLists.txt index beef930d70..d0cc11b46b 100644 --- a/Source/Core/CMakeLists.txt +++ b/Source/Core/CMakeLists.txt @@ -6,6 +6,7 @@ if(wxWidgets_FOUND) add_subdirectory(DebuggerUICommon) add_subdirectory(DebuggerWX) add_subdirectory(InputUICommon) + add_subdirectory(VideoUICommon) endif() add_subdirectory(DiscIO) diff --git a/Source/Core/VideoUICommon/CMakeLists.txt b/Source/Core/VideoUICommon/CMakeLists.txt new file mode 100644 index 0000000000..8c71be91c2 --- /dev/null +++ b/Source/Core/VideoUICommon/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SRCS Src/VideoConfigDiag.cpp) + +add_library(videouicommon STATIC ${SRCS}) +if(UNIX) + add_definitions(-fPIC) +endif(UNIX) diff --git a/Source/Core/VideoUICommon/Src/SConscript b/Source/Core/VideoUICommon/Src/SConscript new file mode 100644 index 0000000000..2c9b9bb315 --- /dev/null +++ b/Source/Core/VideoUICommon/Src/SConscript @@ -0,0 +1,12 @@ +# -*- python -*- + +Import('env') + +if not env['HAVE_WX']: + Return() + +files = [ + 'VideoConfigDiag.cpp', + ] + +env.StaticLibrary(env['local_libs'] + 'videouicommon', files) diff --git a/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp b/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp index f1fcb99a84..ee0a0276b5 100644 --- a/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp +++ b/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp @@ -10,22 +10,24 @@ template class BoolSetting; typedef BoolSetting SettingCheckBox; typedef BoolSetting SettingRadioButton; +template <> SettingCheckBox::BoolSetting(wxWindow* parent, const wxString& label, bool &setting, bool reverse, long style) : wxCheckBox(parent, -1, label, wxDefaultPosition, wxDefaultSize, style) , m_setting(setting) , m_reverse(reverse) { SetValue(m_setting ^ m_reverse); - _connect_macro_(this, BoolSetting::UpdateValue, wxEVT_COMMAND_CHECKBOX_CLICKED, this); + _connect_macro_(this, SettingCheckBox::UpdateValue, wxEVT_COMMAND_CHECKBOX_CLICKED, this); } +template <> SettingRadioButton::BoolSetting(wxWindow* parent, const wxString& label, bool &setting, bool reverse, long style) : wxRadioButton(parent, -1, label, wxDefaultPosition, wxDefaultSize, style) , m_setting(setting) , m_reverse(reverse) { SetValue(m_setting ^ m_reverse); - _connect_macro_(this, BoolSetting::UpdateValue, wxEVT_COMMAND_RADIOBUTTON_SELECTED, this); + _connect_macro_(this, SettingRadioButton::UpdateValue, wxEVT_COMMAND_RADIOBUTTON_SELECTED, this); } SettingChoice::SettingChoice(wxWindow* parent, int &setting, int num, const wxString choices[]) diff --git a/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt b/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt index 04fed2551a..308eac4469 100644 --- a/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt +++ b/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt @@ -13,6 +13,7 @@ set(SRCS Src/BPFunctions.cpp Src/VertexManager.cpp) set(LIBS videocommon + videouicommon GLEW SOIL common diff --git a/Source/Plugins/Plugin_VideoOGL/Src/SConscript b/Source/Plugins/Plugin_VideoOGL/Src/SConscript index 26fae010c3..c8068c888a 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/SConscript +++ b/Source/Plugins/Plugin_VideoOGL/Src/SConscript @@ -22,7 +22,7 @@ files = [ 'GLUtil.cpp' ] -libs = [ 'videocommon', 'GLEW', 'SOIL', 'common' ] +libs = [ 'videocommon', 'videouicommon', 'GLEW', 'SOIL', 'common' ] if env['HAVE_WX']: files += [