revert #1731 and gate the bluez headers properly.

1731 took a sledge hammer to the pairing button and skipped it entirely by build gating it behind linux only libraries, when those linux only libraries exist in an attempt to prevent builds failing on distro's lacking the bluetooth headers provided by bluez.

This reverts that and properly gates the headers behind the HAS_BLUEZ definition.
This commit is contained in:
Squall-Leonhart 2026-03-28 20:35:17 +11:00
parent 6648a9c225
commit 0ca9121cd3
3 changed files with 4 additions and 9 deletions

View File

@ -76,6 +76,8 @@ add_library(CemuWxGui STATIC
input/InputAPIAddWindow.h
input/InputSettings2.cpp
input/InputSettings2.h
input/PairingDialog.cpp
input/PairingDialog.h
input/panels/ClassicControllerInputPanel.cpp
input/panels/ClassicControllerInputPanel.h
input/panels/InputPanel.cpp
@ -124,10 +126,7 @@ if (ENABLE_METAL)
endif()
if (ENABLE_BLUEZ)
target_sources(CemuWxGui PRIVATE
input/PairingDialog.cpp
input/PairingDialog.h
)
target_compile_definitions(CemuWxGui PRIVATE HAS_BLUEZ)
endif()
set_property(TARGET CemuWxGui PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

View File

@ -21,9 +21,7 @@
#include "wxgui/input/InputAPIAddWindow.h"
#include "input/ControllerFactory.h"
#ifdef HAS_BLUEZ
#include "wxgui/input/PairingDialog.h"
#endif
#include "wxgui/input/panels/VPADInputPanel.h"
#include "wxgui/input/panels/ProControllerInputPanel.h"
@ -257,14 +255,12 @@ wxWindow* InputSettings2::initialize_page(size_t index)
page_data.m_controller_api_remove = remove_api;
}
#ifdef HAS_BLUEZ
auto* pairingDialog = new wxButton(page, wxID_ANY, _("Pair Wii/Wii U Controller"));
pairingDialog->Bind(wxEVT_BUTTON, [this](wxEvent&) {
PairingDialog pairing_dialog(this);
pairing_dialog.ShowModal();
});
sizer->Add(pairingDialog, wxGBPosition(5, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
#endif
// controller
auto* controller_bttns = new wxBoxSizer(wxHORIZONTAL);

View File

@ -4,7 +4,7 @@
#if BOOST_OS_WINDOWS
#include <bluetoothapis.h>
#endif
#if BOOST_OS_LINUX
#ifdef HAS_BLUEZ
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>