Compare commits

...

4 Commits

Author SHA1 Message Date
Jordan Woyak
54b96c0ff6
Merge 1888770256 into 2c92e5b5b3 2024-11-12 08:14:24 -05:00
OatmealDome
2c92e5b5b3
Merge pull request #13160 from cpba/flatpak-6.8-runtime
Flatpak: Upgrade kde runtime to 6.8
2024-11-12 00:30:46 -05:00
Carles Pastor
fe96bf4108 Flatpak: Upgrade kde runtime to 6.8
this version bundles SDL2-2.30.6, the temporary measure of building the
vendored version from exports is no longer necessary.
2024-11-10 12:06:06 +01:00
Jordan Woyak
1888770256 DolphinQt: Display more user-friendly names in the mapping window device list. 2024-11-05 17:50:05 -06:00
3 changed files with 23 additions and 30 deletions

View File

@ -1,22 +0,0 @@
{
"name": "SDL2",
"buildsystem": "autotools",
"config-opts": ["--disable-static"],
"sources": [
{
"type": "dir",
"path": "../../Externals/SDL/SDL"
}
],
"cleanup": [ "/bin/sdl2-config",
"/include",
"/lib/libSDL2.la",
"/lib/libSDL2main.a",
"/lib/libSDL2main.la",
"/lib/libSDL2_test.a",
"/lib/libSDL2_test.la",
"/lib/cmake",
"/share/aclocal",
"/lib/pkgconfig"]
}

View File

@ -1,6 +1,6 @@
app-id: org.DolphinEmu.dolphin-emu app-id: org.DolphinEmu.dolphin-emu
runtime: org.kde.Platform runtime: org.kde.Platform
runtime-version: '6.7' runtime-version: '6.8'
sdk: org.kde.Sdk sdk: org.kde.Sdk
command: dolphin-emu-wrapper command: dolphin-emu-wrapper
rename-desktop-file: dolphin-emu.desktop rename-desktop-file: dolphin-emu.desktop
@ -47,9 +47,6 @@ modules:
url: https://github.com/Unrud/xdg-screensaver-shim/archive/0.0.2.tar.gz url: https://github.com/Unrud/xdg-screensaver-shim/archive/0.0.2.tar.gz
sha256: 0ed2a69fe6ee6cbffd2fe16f85116db737f17fb1e79bfb812d893cf15c728399 sha256: 0ed2a69fe6ee6cbffd2fe16f85116db737f17fb1e79bfb812d893cf15c728399
# build the vendored SDL2 from Externals until the runtime gets 2.30.6
- SDL2/SDL2.json
- name: dolphin-emu - name: dolphin-emu
buildsystem: cmake-ninja buildsystem: cmake-ninja
config-opts: config-opts:

View File

@ -59,6 +59,22 @@
#include "InputCommon/ControllerInterface/CoreDevice.h" #include "InputCommon/ControllerInterface/CoreDevice.h"
#include "InputCommon/InputConfig.h" #include "InputCommon/InputConfig.h"
namespace
{
QString GetUserFriendlyDeviceName(const std::string& str)
{
ciface::Core::DeviceQualifier qualifier;
qualifier.FromString(str);
return QStringLiteral("%1 (%2) %3")
.arg(QString::fromStdString(qualifier.name))
.arg(qualifier.cid + 1)
.arg(QString::fromStdString(qualifier.source));
}
} // namespace
MappingWindow::MappingWindow(QWidget* parent, Type type, int port_num) MappingWindow::MappingWindow(QWidget* parent, Type type, int port_num)
: QDialog(parent), m_port(port_num) : QDialog(parent), m_port(port_num)
{ {
@ -363,8 +379,9 @@ void MappingWindow::OnGlobalDevicesChanged()
for (const auto& name : g_controller_interface.GetAllDeviceStrings()) for (const auto& name : g_controller_interface.GetAllDeviceStrings())
{ {
const auto display_name = GetUserFriendlyDeviceName(name);
const auto qname = QString::fromStdString(name); const auto qname = QString::fromStdString(name);
m_devices_combo->addItem(qname, qname); m_devices_combo->addItem(display_name, qname);
} }
const auto default_device = m_controller->GetDefaultDevice().ToString(); const auto default_device = m_controller->GetDefaultDevice().ToString();
@ -372,7 +389,7 @@ void MappingWindow::OnGlobalDevicesChanged()
if (!default_device.empty()) if (!default_device.empty())
{ {
const auto default_device_index = const auto default_device_index =
m_devices_combo->findText(QString::fromStdString(default_device)); m_devices_combo->findData(QString::fromStdString(default_device));
if (default_device_index != -1) if (default_device_index != -1)
{ {
@ -382,9 +399,10 @@ void MappingWindow::OnGlobalDevicesChanged()
{ {
// Selected device is not currently attached. // Selected device is not currently attached.
m_devices_combo->insertSeparator(m_devices_combo->count()); m_devices_combo->insertSeparator(m_devices_combo->count());
const auto display_name = GetUserFriendlyDeviceName(default_device);
const auto qname = QString::fromStdString(default_device); const auto qname = QString::fromStdString(default_device);
m_devices_combo->addItem(QLatin1Char{'['} + tr("disconnected") + QStringLiteral("] ") + qname, m_devices_combo->addItem(
qname); QLatin1Char{'['} + tr("disconnected") + QStringLiteral("] ") + display_name, qname);
m_devices_combo->setCurrentIndex(m_devices_combo->count() - 1); m_devices_combo->setCurrentIndex(m_devices_combo->count() - 1);
} }
} }