mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28da984b01 | ||
|
|
967987b25f | ||
|
|
e41f63b821 | ||
|
|
0f82503cf7 | ||
|
|
33f625a4e2 | ||
|
|
5b0c22c343 | ||
|
|
ea963ffd72 |
@@ -47,7 +47,7 @@ LIBPNG=1.6.53
|
||||
LIBJPEGTURBO=3.1.2
|
||||
LIBWEBP=1.6.0
|
||||
FFMPEG=8.0
|
||||
MOLTENVK=1.2.9
|
||||
MOLTENVK=1.4.1
|
||||
QT=6.10.1
|
||||
QTAPNG=1.3.0
|
||||
KDDOCKWIDGETS=2.4.0
|
||||
@@ -88,7 +88,7 @@ e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 libwebp-$LIBWE
|
||||
452a1a290bd0cf18737fad0057dc17b7fdf10a73eda2d6d4f31ba04fda25ef2c libpng-$LIBPNG-apng.patch.gz
|
||||
8f0012234b464ce50890c490f18194f913a7b1f4e6a03d6644179fa0f867d0cf libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||
b2751fccb6cc4c77708113cd78b561059b6fa904b24162fa0be2d60273d27b8e ffmpeg-$FFMPEG.tar.xz
|
||||
f415a09385030c6510a936155ce211f617c31506db5fbc563e804345f1ecf56e v$MOLTENVK.tar.gz
|
||||
9985f141902a17de818e264d17c1ce334b748e499ee02fcb4703e4dc0038f89c v$MOLTENVK.tar.gz
|
||||
5a6226f7e23db51fdc3223121eba53f3f5447cf0cc4d6cb82a3a2df7a65d265d qtbase-everywhere-src-$QT.tar.xz
|
||||
498eabdf2381db96f808942b3e3c765f6360fe6c0e9961f0a45ff7a4c68d7a72 qtimageformats-everywhere-src-$QT.tar.xz
|
||||
c02f355a58f3bbcf404a628bf488b6aeb2d84a94c269afdb86f6e529343ab01f qtsvg-everywhere-src-$QT.tar.xz
|
||||
@@ -277,7 +277,7 @@ rm -fr "MoltenVK-${MOLTENVK}"
|
||||
tar xf "v$MOLTENVK.tar.gz"
|
||||
cd "MoltenVK-${MOLTENVK}"
|
||||
./fetchDependencies --macos
|
||||
make macos
|
||||
make macos MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=0 MVK_CONFIG_USE_METAL_PRIVATE_API=1
|
||||
cp Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib "$INSTALLDIR/lib/"
|
||||
cd ..
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ LIBPNG=1.6.53
|
||||
LIBJPEGTURBO=3.1.2
|
||||
LIBWEBP=1.6.0
|
||||
FFMPEG=8.0
|
||||
MOLTENVK=1.2.9
|
||||
MOLTENVK=1.4.1
|
||||
QT=6.10.1
|
||||
QTAPNG=1.3.0
|
||||
KDDOCKWIDGETS=2.4.0
|
||||
@@ -69,7 +69,7 @@ e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 libwebp-$LIBWE
|
||||
452a1a290bd0cf18737fad0057dc17b7fdf10a73eda2d6d4f31ba04fda25ef2c libpng-$LIBPNG-apng.patch.gz
|
||||
8f0012234b464ce50890c490f18194f913a7b1f4e6a03d6644179fa0f867d0cf libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||
b2751fccb6cc4c77708113cd78b561059b6fa904b24162fa0be2d60273d27b8e ffmpeg-$FFMPEG.tar.xz
|
||||
f415a09385030c6510a936155ce211f617c31506db5fbc563e804345f1ecf56e v$MOLTENVK.tar.gz
|
||||
9985f141902a17de818e264d17c1ce334b748e499ee02fcb4703e4dc0038f89c v$MOLTENVK.tar.gz
|
||||
5a6226f7e23db51fdc3223121eba53f3f5447cf0cc4d6cb82a3a2df7a65d265d qtbase-everywhere-src-$QT.tar.xz
|
||||
498eabdf2381db96f808942b3e3c765f6360fe6c0e9961f0a45ff7a4c68d7a72 qtimageformats-everywhere-src-$QT.tar.xz
|
||||
c02f355a58f3bbcf404a628bf488b6aeb2d84a94c269afdb86f6e529343ab01f qtsvg-everywhere-src-$QT.tar.xz
|
||||
@@ -225,7 +225,7 @@ cd "MoltenVK-${MOLTENVK}"
|
||||
sed -i '' 's/xcodebuild "$@"/xcodebuild $XCODEBUILD_EXTRA_ARGS "$@"/g' fetchDependencies
|
||||
sed -i '' 's/XCODEBUILD :=/XCODEBUILD ?=/g' Makefile
|
||||
XCODEBUILD_EXTRA_ARGS="VALID_ARCHS=x86_64" ./fetchDependencies --macos
|
||||
XCODEBUILD="set -o pipefail && xcodebuild VALID_ARCHS=x86_64" make macos
|
||||
XCODEBUILD="set -o pipefail && xcodebuild VALID_ARCHS=x86_64" make macos MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=0 MVK_CONFIG_USE_METAL_PRIVATE_API=1
|
||||
cp Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib "$INSTALLDIR/lib/"
|
||||
cd ..
|
||||
|
||||
|
||||
@@ -11384,6 +11384,10 @@ SCUS-97197:
|
||||
name: "War of the Monsters"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
memcardFilters: # Reads Twisted Metal Black for bonus unlockable.
|
||||
- "SCUS-97101"
|
||||
- "SCUS-97179"
|
||||
- "SCUS-97197"
|
||||
SCUS-97198:
|
||||
name: "Sly Cooper and the Thievius Raccoonus"
|
||||
region: "NTSC-U"
|
||||
@@ -30583,6 +30587,11 @@ SLES-82030:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLES-82030"
|
||||
- "SLES-82031"
|
||||
- "SLES-50677"
|
||||
- "SLES-50822"
|
||||
SLES-82031:
|
||||
name: "Shadow Hearts - Covenant [Disc 2 of 2]"
|
||||
region: "PAL-M3"
|
||||
@@ -30590,8 +30599,11 @@ SLES-82031:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters:
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLES-82030"
|
||||
- "SLES-82031"
|
||||
- "SLES-50677"
|
||||
- "SLES-50822"
|
||||
SLES-82032:
|
||||
name: "Metal Gear Solid 3 - Snake Eater"
|
||||
region: "PAL-G"
|
||||
@@ -43473,6 +43485,11 @@ SLPM-65428:
|
||||
name-en: "BioHazard Outbreak"
|
||||
region: "NTSC-J"
|
||||
compat: 5
|
||||
memcardFilters:
|
||||
- "SLPM-65428"
|
||||
- "SLPM-74201"
|
||||
- "SLPM-65286"
|
||||
- "BWNETCNF"
|
||||
SLPM-65429:
|
||||
name: "ギャラクシーエンジェル Moonlit Lovers [初回限定版ファーストパッケージ]"
|
||||
name-sort: "ぎゃらくしーえんじぇる Moonlit Lovers [しょかいげんていばんふぁーすとぱっけーじ]"
|
||||
@@ -44973,6 +44990,8 @@ SLPM-65692:
|
||||
- "SLPM-65692"
|
||||
- "SLPM-65428"
|
||||
- "SLPM-74201"
|
||||
- "SLPM-65286"
|
||||
- "BWNETCNF"
|
||||
SLPM-65693:
|
||||
name: "ときめきメモリアル3 ~約束のあの場所で~ [コナミ殿堂セレクション]"
|
||||
name-sort: "ときめきめもりある3 やくそくのあのばしょで [こなみでんどうせれくしょん]"
|
||||
@@ -53680,6 +53699,11 @@ SLPM-74201:
|
||||
name-sort: "ばいおはざーど あうとぶれいく [PlayStation2 the Best]"
|
||||
name-en: "BioHazard Outbreak [PlayStation2 the Best]"
|
||||
region: "NTSC-J"
|
||||
memcardFilters:
|
||||
- "SLPM-65428"
|
||||
- "SLPM-74201"
|
||||
- "SLPM-65286"
|
||||
- "BWNETCNF"
|
||||
SLPM-74202:
|
||||
name: "風雲 新撰組 [PlayStation2 the Best]"
|
||||
name-sort: "ふううん しんせんぐみ [PlayStation2 the Best]"
|
||||
@@ -58845,6 +58869,11 @@ SLPS-25317:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLPS-25317"
|
||||
- "SLPS-25318"
|
||||
- "SLPS-25041"
|
||||
- "SLPS-73418"
|
||||
SLPS-25318:
|
||||
name: "シャドウハーツⅡ [DXパック] [ディスク2/2]"
|
||||
name-sort: "しゃどうはーつ2 [DXぱっく] [でぃすく2/2]"
|
||||
@@ -58854,8 +58883,11 @@ SLPS-25318:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters:
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLPS-25317"
|
||||
- "SLPS-25318"
|
||||
- "SLPS-25041"
|
||||
- "SLPS-73418"
|
||||
SLPS-25319:
|
||||
name: "ケロケロキング スーパーDX"
|
||||
name-sort: "けろけろきんぐ すーぱーDX"
|
||||
@@ -58934,6 +58966,11 @@ SLPS-25334:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLPS-25334"
|
||||
- "SLPS-25335"
|
||||
- "SLPS-25041"
|
||||
- "SLPS-73418"
|
||||
SLPS-25335:
|
||||
name: "シャドウハーツⅡ [通常版] [ディスク2/2]"
|
||||
name-sort: "しゃどうはーつ2 [つうじょうばん] [でぃすく2/2]"
|
||||
@@ -58943,8 +58980,11 @@ SLPS-25335:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters:
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLPS-25334"
|
||||
- "SLPS-25335"
|
||||
- "SLPS-25041"
|
||||
- "SLPS-73418"
|
||||
SLPS-25336:
|
||||
name: "バスランディング3 [Sammy best] [つりコン2+ 同梱版]"
|
||||
name-sort: "ばすらんでぃんぐ3 [Sammy best] [つりこん2 どうこんばん]"
|
||||
@@ -63242,6 +63282,11 @@ SLPS-73214:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLPS-73214"
|
||||
- "SLPS-73215"
|
||||
- "SLPS-25041"
|
||||
- "SLPS-73418"
|
||||
SLPS-73215:
|
||||
name: "シャドウハーツⅡ ディレクターズカット [PlayStation2 the Best] [ディスク2/2]"
|
||||
name-sort: "しゃどうはーつ2 でぃれくたーずかっと [PlayStation2 the Best] [でぃすく2/2]"
|
||||
@@ -63251,8 +63296,11 @@ SLPS-73215:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters:
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLPS-73214"
|
||||
- "SLPS-73215"
|
||||
- "SLPS-25041"
|
||||
- "SLPS-73418"
|
||||
SLPS-73216:
|
||||
name: "マグナカルタ [PlayStation2 the Best]"
|
||||
name-sort: "まぐなかるた [PlayStation2 the Best]"
|
||||
@@ -69321,6 +69369,10 @@ SLUS-21041:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLUS-21041"
|
||||
- "SLUS-21044"
|
||||
- "SLUS-20347"
|
||||
SLUS-21042:
|
||||
name: "Darkwatch"
|
||||
region: "NTSC-U"
|
||||
@@ -69339,8 +69391,10 @@ SLUS-21044:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters:
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLUS-21041"
|
||||
- "SLUS-21044"
|
||||
- "SLUS-20347"
|
||||
SLUS-21045:
|
||||
name: "Conflict - Vietnam"
|
||||
region: "NTSC-U"
|
||||
|
||||
@@ -109,14 +109,14 @@ disable_compiler_warnings_for_target(speex)
|
||||
# Find the Qt components that we need.
|
||||
if(ENABLE_QT_UI)
|
||||
find_package(Qt6 6.10.0 COMPONENTS CoreTools Core GuiTools Gui WidgetsTools Widgets LinguistTools REQUIRED)
|
||||
endif()
|
||||
|
||||
if (Qt6_VERSION VERSION_GREATER_EQUAL 6.10.0)
|
||||
find_package(Qt6 COMPONENTS CorePrivate GuiPrivate WidgetsPrivate REQUIRED)
|
||||
endif()
|
||||
if (Qt6_VERSION VERSION_GREATER_EQUAL 6.10.0)
|
||||
find_package(Qt6 COMPONENTS CorePrivate GuiPrivate WidgetsPrivate REQUIRED)
|
||||
endif()
|
||||
|
||||
# The docking system for the debugger.
|
||||
# The docking system for the debugger.
|
||||
find_package(KDDockWidgets-qt6 2.3.0 REQUIRED)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
add_subdirectory(3rdparty/rainterface EXCLUDE_FROM_ALL)
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
void restoreGeometry(const QByteArray& geometry);
|
||||
|
||||
Q_SIGNALS:
|
||||
void windowResizedEvent(int width, int height, float scale);
|
||||
void windowResizedEvent(u32 width, u32 height, float scale);
|
||||
void windowRestoredEvent();
|
||||
|
||||
void dragEnterEvent(QDragEnterEvent* event);
|
||||
|
||||
@@ -777,7 +777,7 @@ void EmuThread::connectDisplaySignals(DisplaySurface* widget)
|
||||
connect(widget, &DisplaySurface::windowRestoredEvent, this, &EmuThread::redrawDisplayWindow);
|
||||
}
|
||||
|
||||
void EmuThread::onDisplayWindowResized(int width, int height, float scale)
|
||||
void EmuThread::onDisplayWindowResized(u32 width, u32 height, float scale)
|
||||
{
|
||||
if (!MTGS::IsOpen())
|
||||
return;
|
||||
|
||||
@@ -191,7 +191,7 @@ private:
|
||||
private Q_SLOTS:
|
||||
void stopInThread();
|
||||
void doBackgroundControllerPoll();
|
||||
void onDisplayWindowResized(int width, int height, float scale);
|
||||
void onDisplayWindowResized(u32 width, u32 height, float scale);
|
||||
void onApplicationStateChanged(Qt::ApplicationState state);
|
||||
void redrawDisplayWindow();
|
||||
|
||||
|
||||
@@ -463,7 +463,7 @@ namespace SettingWidgetBinder
|
||||
{
|
||||
if (!isNullable(widget))
|
||||
{
|
||||
widget->connect(widget, QOverload<int>::of(&QSpinBox::valueChanged), func);
|
||||
widget->connect(widget, &QSpinBox::valueChanged, func);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -591,7 +591,7 @@ namespace SettingWidgetBinder
|
||||
{
|
||||
if (!isNullable(widget))
|
||||
{
|
||||
widget->connect(widget, QOverload<double>::of(&QDoubleSpinBox::valueChanged), func);
|
||||
widget->connect(widget, &QDoubleSpinBox::valueChanged, func);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -608,7 +608,7 @@ namespace SettingWidgetBinder
|
||||
});
|
||||
menu.exec(widget->mapToGlobal(pt));
|
||||
});
|
||||
widget->connect(widget, QOverload<double>::of(&QDoubleSpinBox::valueChanged), widget, [widget, func = std::move(func)]() {
|
||||
widget->connect(widget, &QDoubleSpinBox::valueChanged, widget, [widget, func = std::move(func)]() {
|
||||
if (widget->property(IS_NULL_PROPERTY).toBool())
|
||||
{
|
||||
widget->setProperty(IS_NULL_PROPERTY, QVariant(false));
|
||||
|
||||
@@ -42,9 +42,9 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* settings_dialog,
|
||||
m_ui.eeClampMode->setCurrentIndex(getClampingModeIndex(-1));
|
||||
m_ui.vu0ClampMode->setCurrentIndex(getClampingModeIndex(0));
|
||||
m_ui.vu1ClampMode->setCurrentIndex(getClampingModeIndex(1));
|
||||
connect(m_ui.eeClampMode, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) { setClampingMode(-1, index); });
|
||||
connect(m_ui.vu0ClampMode, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) { setClampingMode(0, index); });
|
||||
connect(m_ui.vu1ClampMode, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) { setClampingMode(1, index); });
|
||||
connect(m_ui.eeClampMode, &QComboBox::currentIndexChanged, [this](int index) { setClampingMode(-1, index); });
|
||||
connect(m_ui.vu0ClampMode, &QComboBox::currentIndexChanged, [this](int index) { setClampingMode(0, index); });
|
||||
connect(m_ui.vu1ClampMode, &QComboBox::currentIndexChanged, [this](int index) { setClampingMode(1, index); });
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.iopRecompiler, "EmuCore/CPU/Recompiler", "EnableIOP", true);
|
||||
|
||||
@@ -60,7 +60,7 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* settings_dialog,
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(
|
||||
sif, m_ui.savestateCompressionLevel, "EmuCore", "SavestateCompressionRatio", static_cast<int>(SavestateCompressionLevel::Medium));
|
||||
|
||||
connect(m_ui.savestateCompressionMethod, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_ui.savestateCompressionMethod, &QComboBox::currentIndexChanged, this,
|
||||
&AdvancedSettingsWidget::onSavestateCompressionTypeChanged);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.backupSaveStates, "EmuCore", "BackupSavestate", true);
|
||||
|
||||
@@ -49,7 +49,7 @@ ControllerBindingWidget::ControllerBindingWidget(QWidget* parent, ControllerSett
|
||||
ControllerSettingWidgetBinder::BindWidgetToInputProfileString(m_dialog->getProfileSettingsInterface(),
|
||||
m_ui.controllerType, m_config_section, "Type", Pad::GetControllerInfo(Pad::GetDefaultPadType(port))->name);
|
||||
|
||||
connect(m_ui.controllerType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ControllerBindingWidget::onTypeChanged);
|
||||
connect(m_ui.controllerType, &QComboBox::currentIndexChanged, this, &ControllerBindingWidget::onTypeChanged);
|
||||
connect(m_ui.bindings, &QPushButton::clicked, this, &ControllerBindingWidget::onBindingsClicked);
|
||||
connect(m_ui.settings, &QPushButton::clicked, this, &ControllerBindingWidget::onSettingsClicked);
|
||||
connect(m_ui.macros, &QPushButton::clicked, this, &ControllerBindingWidget::onMacrosClicked);
|
||||
@@ -1002,8 +1002,8 @@ USBDeviceWidget::USBDeviceWidget(QWidget* parent, ControllerSettingsWindow* dial
|
||||
ControllerSettingWidgetBinder::BindWidgetToInputProfileString(
|
||||
m_dialog->getProfileSettingsInterface(), m_ui.deviceType, m_config_section, "Type", "None");
|
||||
|
||||
connect(m_ui.deviceType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &USBDeviceWidget::onTypeChanged);
|
||||
connect(m_ui.deviceSubtype, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &USBDeviceWidget::onSubTypeChanged);
|
||||
connect(m_ui.deviceType, &QComboBox::currentIndexChanged, this, &USBDeviceWidget::onTypeChanged);
|
||||
connect(m_ui.deviceSubtype, &QComboBox::currentIndexChanged, this, &USBDeviceWidget::onSubTypeChanged);
|
||||
connect(m_ui.bindings, &QPushButton::clicked, this, &USBDeviceWidget::onBindingsClicked);
|
||||
connect(m_ui.settings, &QPushButton::clicked, this, &USBDeviceWidget::onSettingsClicked);
|
||||
connect(m_ui.automaticBinding, &QPushButton::clicked, this, &USBDeviceWidget::onAutomaticBindingClicked);
|
||||
|
||||
@@ -62,8 +62,8 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* settings_dialog, QWidget*
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Eth Device Settings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
connect(m_ui.ethDevType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DEV9SettingsWidget::onEthDeviceTypeChanged);
|
||||
connect(m_ui.ethDev, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DEV9SettingsWidget::onEthDeviceChanged);
|
||||
connect(m_ui.ethDevType, &QComboBox::currentIndexChanged, this, &DEV9SettingsWidget::onEthDeviceTypeChanged);
|
||||
connect(m_ui.ethDev, &QComboBox::currentIndexChanged, this, &DEV9SettingsWidget::onEthDeviceChanged);
|
||||
//Comboboxes populated in show event
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -125,12 +125,12 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* settings_dialog, QWidget*
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.ethDNS1Mode, "DEV9/Eth", "ModeDNS1",
|
||||
s_dns_name, Pcsx2Config::DEV9Options::DnsModeNames, Pcsx2Config::DEV9Options::DnsModeNames[static_cast<int>(Pcsx2Config::DEV9Options::DnsMode::Auto)], "DEV9SettingsWidget");
|
||||
onEthDNSModeChanged(m_ui.ethDNS1Mode, m_ui.ethDNS1Mode->currentIndex(), m_ui.ethDNS1Addr, "DEV9/Eth", "ModeDNS1");
|
||||
connect(m_ui.ethDNS1Mode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [&](int index) { onEthDNSModeChanged(m_ui.ethDNS1Mode, index, m_ui.ethDNS1Addr, "DEV9/Eth", "ModeDNS1"); });
|
||||
connect(m_ui.ethDNS1Mode, &QComboBox::currentIndexChanged, this, [&](int index) { onEthDNSModeChanged(m_ui.ethDNS1Mode, index, m_ui.ethDNS1Addr, "DEV9/Eth", "ModeDNS1"); });
|
||||
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.ethDNS2Mode, "DEV9/Eth", "ModeDNS2",
|
||||
s_dns_name, Pcsx2Config::DEV9Options::DnsModeNames, Pcsx2Config::DEV9Options::DnsModeNames[static_cast<int>(Pcsx2Config::DEV9Options::DnsMode::Auto)], "DEV9SettingsWidget");
|
||||
onEthDNSModeChanged(m_ui.ethDNS2Mode, m_ui.ethDNS2Mode->currentIndex(), m_ui.ethDNS2Addr, "DEV9/Eth", "ModeDNS2");
|
||||
connect(m_ui.ethDNS2Mode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [&](int index) { onEthDNSModeChanged(m_ui.ethDNS2Mode, index, m_ui.ethDNS2Addr, "DEV9/Eth", "ModeDNS2"); });
|
||||
connect(m_ui.ethDNS2Mode, &QComboBox::currentIndexChanged, this, [&](int index) { onEthDNSModeChanged(m_ui.ethDNS2Mode, index, m_ui.ethDNS2Addr, "DEV9/Eth", "ModeDNS2"); });
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// DNS Settings
|
||||
@@ -144,7 +144,7 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* settings_dialog, QWidget*
|
||||
headers.push_back(tr("Enabled"));
|
||||
m_ethHost_model->setHorizontalHeaderLabels(headers);
|
||||
|
||||
connect(m_ethHost_model, QOverload<QStandardItem*>::of(&QStandardItemModel::itemChanged), this, &DEV9SettingsWidget::onEthHostEdit);
|
||||
connect(m_ethHost_model, &QStandardItemModel::itemChanged, this, &DEV9SettingsWidget::onEthHostEdit);
|
||||
|
||||
m_ethHosts_proxy = new QSortFilterProxyModel(m_ui.ethHosts);
|
||||
m_ethHosts_proxy->setSourceModel(m_ethHost_model);
|
||||
@@ -186,7 +186,7 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* settings_dialog, QWidget*
|
||||
connect(m_ui.hddFile, &QLineEdit::editingFinished, this, &DEV9SettingsWidget::onHddFileEdit);
|
||||
connect(m_ui.hddBrowseFile, &QPushButton::clicked, this, &DEV9SettingsWidget::onHddBrowseFileClicked);
|
||||
|
||||
connect(m_ui.hddSizeSlider, QOverload<int>::of(&QSlider::valueChanged), this, &DEV9SettingsWidget::onHddSizeSlide);
|
||||
connect(m_ui.hddSizeSlider, &QSlider::valueChanged, this, &DEV9SettingsWidget::onHddSizeSlide);
|
||||
SettingWidgetBinder::SettingAccessor<QSpinBox>::connectValueChanged(m_ui.hddSizeSpinBox, [&]() { onHddSizeAccessorSpin(); });
|
||||
|
||||
connect(m_ui.hddCreate, &QPushButton::clicked, this, &DEV9SettingsWidget::onHddCreateClicked);
|
||||
|
||||
@@ -94,7 +94,7 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* settings_dialog
|
||||
const std::optional<int> cycle_rate =
|
||||
dialog()->getIntValue("EmuCore/Speedhacks", "EECycleRate", sif ? std::nullopt : std::optional<int>(DEFAULT_EE_CYCLE_RATE));
|
||||
m_ui.eeCycleRate->setCurrentIndex(cycle_rate.has_value() ? (std::clamp(cycle_rate.value(), MINIMUM_EE_CYCLE_RATE, MAXIMUM_EE_CYCLE_RATE) + (0 - MINIMUM_EE_CYCLE_RATE) + static_cast<int>(dialog()->isPerGameSettings())) : 0);
|
||||
connect(m_ui.eeCycleRate, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [&](int index) {
|
||||
connect(m_ui.eeCycleRate, &QComboBox::currentIndexChanged, this, [&](int index) {
|
||||
std::optional<int> value;
|
||||
if (!dialog()->isPerGameSettings() || index > 0)
|
||||
value = MINIMUM_EE_CYCLE_RATE + index - static_cast<int>(dialog()->isPerGameSettings());
|
||||
@@ -218,7 +218,7 @@ void EmulationSettingsWidget::initializeSpeedCombo(QComboBox* cb, const char* se
|
||||
cb->setCurrentIndex(custom_index);
|
||||
}
|
||||
|
||||
connect(cb, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
connect(cb, &QComboBox::currentIndexChanged, this,
|
||||
[this, cb, section, key](int index) { handleSpeedComboChange(cb, section, key); });
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* settings_dialog,
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_display.cropBottom, "EmuCore/GS", "CropBottom", 0);
|
||||
|
||||
connect(
|
||||
m_display.fullscreenModes, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onFullscreenModeChanged);
|
||||
m_display.fullscreenModes, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onFullscreenModeChanged);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// HW Settings
|
||||
@@ -114,9 +114,9 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* settings_dialog,
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(
|
||||
sif, m_hw.blending, "EmuCore/GS", "accurate_blending_unit", static_cast<int>(AccBlendLevel::Basic));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_hw.enableHWFixes, "EmuCore/GS", "UserHacks", false);
|
||||
connect(m_hw.upscaleMultiplier, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_hw.upscaleMultiplier, &QComboBox::currentIndexChanged, this,
|
||||
&GraphicsSettingsWidget::onUpscaleMultiplierChanged);
|
||||
connect(m_hw.trilinearFiltering, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_hw.trilinearFiltering, &QComboBox::currentIndexChanged, this,
|
||||
&GraphicsSettingsWidget::onTrilinearFilteringChanged);
|
||||
onTrilinearFilteringChanged();
|
||||
|
||||
@@ -150,7 +150,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* settings_dialog,
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_fixes.readTCOnClose, "EmuCore/GS", "UserHacks_ReadTCOnClose", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_fixes.estimateTextureRegion, "EmuCore/GS", "UserHacks_EstimateTextureRegion", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_fixes.gpuPaletteConversion, "EmuCore/GS", "paltex", false);
|
||||
connect(m_fixes.cpuSpriteRenderBW, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_fixes.cpuSpriteRenderBW, &QComboBox::currentIndexChanged, this,
|
||||
&GraphicsSettingsWidget::onCPUSpriteRenderBWChanged);
|
||||
connect(m_fixes.gpuPaletteConversion, &QCheckBox::checkStateChanged, this, &GraphicsSettingsWidget::onGpuPaletteConversionChanged);
|
||||
onCPUSpriteRenderBWChanged();
|
||||
@@ -295,8 +295,8 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* settings_dialog,
|
||||
m_header.rendererDropdown->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
connect(m_header.rendererDropdown, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onRendererChanged);
|
||||
connect(m_header.adapterDropdown, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onAdapterChanged);
|
||||
connect(m_header.rendererDropdown, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onRendererChanged);
|
||||
connect(m_header.adapterDropdown, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onAdapterChanged);
|
||||
connect(m_hw.enableHWFixes, &QCheckBox::checkStateChanged, this, &GraphicsSettingsWidget::updateRendererDependentOptions);
|
||||
connect(m_advanced.extendedUpscales, &QCheckBox::checkStateChanged, this, &GraphicsSettingsWidget::updateRendererDependentOptions);
|
||||
connect(m_hw.textureFiltering, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onTextureFilteringChange);
|
||||
|
||||
@@ -133,18 +133,18 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* settings_dialog
|
||||
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.theme, "UI", "Theme", THEME_NAMES, THEME_VALUES,
|
||||
QtHost::GetDefaultThemeName(), "InterfaceSettingsWidget");
|
||||
connect(m_ui.theme, QOverload<int>::of(&QComboBox::currentIndexChanged), [this]() { emit themeChanged(); });
|
||||
connect(m_ui.theme, &QComboBox::currentIndexChanged, [this]() { emit themeChanged(); });
|
||||
|
||||
SettingWidgetBinder::BindWidgetToFloatSetting(sif, m_ui.backgroundOpacity, "UI", "GameListBackgroundOpacity", 100.0f);
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.backgroundScale, "UI", "GameListBackgroundMode", BACKGROUND_SCALE_NAMES, QtUtils::ScalingMode::Fit);
|
||||
connect(m_ui.backgroundBrowse, &QPushButton::clicked, [this]() { onSetGameListBackgroundTriggered(); });
|
||||
connect(m_ui.backgroundReset, &QPushButton::clicked, [this]() { onClearGameListBackgroundTriggered(); });
|
||||
connect(m_ui.backgroundOpacity, &QSpinBox::editingFinished, [this]() { emit backgroundChanged(); });
|
||||
connect(m_ui.backgroundScale, QOverload<int>::of(&QComboBox::currentIndexChanged), [this]() { emit backgroundChanged(); });
|
||||
connect(m_ui.backgroundScale, &QComboBox::currentIndexChanged, [this]() { emit backgroundChanged(); });
|
||||
|
||||
populateLanguages();
|
||||
SettingWidgetBinder::BindWidgetToStringSetting(sif, m_ui.language, "UI", "Language", QtHost::GetDefaultLanguage());
|
||||
connect(m_ui.language, QOverload<int>::of(&QComboBox::currentIndexChanged), [this]() { emit languageChanged(); });
|
||||
connect(m_ui.language, &QComboBox::currentIndexChanged, [this]() { emit languageChanged(); });
|
||||
|
||||
// Per-game settings is special, we don't want to bind it if we're editing per-game settings.
|
||||
if (!dialog()->isPerGameSettings())
|
||||
|
||||
@@ -176,7 +176,7 @@ void SetupWizardDialog::setupLanguagePage()
|
||||
{
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(nullptr, m_ui.theme, "UI", "Theme",
|
||||
InterfaceSettingsWidget::THEME_NAMES, InterfaceSettingsWidget::THEME_VALUES, QtHost::GetDefaultThemeName(), "InterfaceSettingsWidget");
|
||||
connect(m_ui.theme, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SetupWizardDialog::themeChanged);
|
||||
connect(m_ui.theme, &QComboBox::currentIndexChanged, this, &SetupWizardDialog::themeChanged);
|
||||
|
||||
for (const std::pair<QString, QString>& it : QtHost::GetAvailableLanguageList())
|
||||
{
|
||||
@@ -189,7 +189,7 @@ void SetupWizardDialog::setupLanguagePage()
|
||||
SettingWidgetBinder::BindWidgetToStringSetting(
|
||||
nullptr, m_ui.language, "UI", "Language", QtHost::GetDefaultLanguage());
|
||||
connect(
|
||||
m_ui.language, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SetupWizardDialog::languageChanged);
|
||||
m_ui.language, &QComboBox::currentIndexChanged, this, &SetupWizardDialog::languageChanged);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(
|
||||
nullptr, m_ui.autoUpdateEnabled, "AutoUpdater", "CheckAtStartup", true);
|
||||
|
||||
@@ -23147,8 +23147,9 @@ Rename it to {} to remove this warning.</source>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-pad.cpp" line="938"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-realplay.cpp" line="448"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-seamic.cpp" line="373"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="79"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="98"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="89"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="108"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="131"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-turntable.cpp" line="440"/>
|
||||
<source>D-Pad Up</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@@ -23160,8 +23161,9 @@ Rename it to {} to remove this warning.</source>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-pad.cpp" line="940"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-realplay.cpp" line="449"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-seamic.cpp" line="374"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="80"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="99"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="90"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="109"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="132"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-turntable.cpp" line="441"/>
|
||||
<source>D-Pad Down</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@@ -23173,8 +23175,9 @@ Rename it to {} to remove this warning.</source>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-pad.cpp" line="941"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-realplay.cpp" line="450"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-seamic.cpp" line="375"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="81"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="100"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="91"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="110"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="133"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-turntable.cpp" line="442"/>
|
||||
<source>D-Pad Left</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@@ -23186,8 +23189,9 @@ Rename it to {} to remove this warning.</source>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-pad.cpp" line="939"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-realplay.cpp" line="451"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-seamic.cpp" line="376"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="82"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="101"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="92"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="111"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="134"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-turntable.cpp" line="443"/>
|
||||
<source>D-Pad Right</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@@ -23211,6 +23215,7 @@ Rename it to {} to remove this warning.</source>
|
||||
<location filename="../../pcsx2/USB/usb-lightgun/guncon2.cpp" line="592"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-pad.cpp" line="139"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-seamic.cpp" line="363"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="154"/>
|
||||
<source>A</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -23218,12 +23223,14 @@ Rename it to {} to remove this warning.</source>
|
||||
<location filename="../../pcsx2/USB/usb-lightgun/guncon2.cpp" line="593"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-pad.cpp" line="140"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-seamic.cpp" line="364"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="155"/>
|
||||
<source>B</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-lightgun/guncon2.cpp" line="594"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-seamic.cpp" line="365"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="156"/>
|
||||
<source>C</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -23234,8 +23241,9 @@ Rename it to {} to remove this warning.</source>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-pad.cpp" line="936"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-pad.cpp" line="1003"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-seamic.cpp" line="371"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="87"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="107"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="97"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="117"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="141"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-turntable.cpp" line="448"/>
|
||||
<source>Select</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@@ -23247,8 +23255,9 @@ Rename it to {} to remove this warning.</source>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-pad.cpp" line="937"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-pad.cpp" line="1002"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-seamic.cpp" line="372"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="88"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="108"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="98"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="118"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="142"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-turntable.cpp" line="449"/>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@@ -23576,8 +23585,8 @@ Rename it to {} to remove this warning.</source>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-pad.cpp" line="77"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-pad.cpp" line="105"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-pad.cpp" line="134"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="78"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="97"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="88"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="107"/>
|
||||
<source>Brake</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -24351,66 +24360,138 @@ Xbox 360 turntables require a 256x multiplier, most other turntables can use the
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="77"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="96"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="40"/>
|
||||
<source>Train Mascon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="41"/>
|
||||
<source>Master Controller</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="87"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="106"/>
|
||||
<source>Power</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="83"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="93"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="138"/>
|
||||
<source>A Button</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="84"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="94"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="139"/>
|
||||
<source>B Button</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="85"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="95"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="140"/>
|
||||
<source>C Button</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="86"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="96"/>
|
||||
<source>D Button</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="102"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="112"/>
|
||||
<source>Announce</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="103"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="113"/>
|
||||
<source>Horn</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="104"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="114"/>
|
||||
<source>Left Door</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="105"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="115"/>
|
||||
<source>Right Door</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="106"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="116"/>
|
||||
<source>Camera Button</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="162"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="126"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="149"/>
|
||||
<source>Power Up</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="127"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="150"/>
|
||||
<source>Power Down</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="128"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="151"/>
|
||||
<source>Reverser Up</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="129"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="152"/>
|
||||
<source>Reverser Down</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="136"/>
|
||||
<source>ATS</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="137"/>
|
||||
<source>Close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="153"/>
|
||||
<source>S</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="227"/>
|
||||
<source>Axes Passthrough</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="163"/>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="228"/>
|
||||
<source>Passes through the unprocessed input axis to the game. Enable if you are using a compatible Densha De Go! controller. Disable if you are using any other joystick.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="240"/>
|
||||
<source>Power notches</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="241"/>
|
||||
<source>Selects the number of power notches (3-6)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="249"/>
|
||||
<source>Brake notches</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/USB/usb-pad/usb-train.cpp" line="250"/>
|
||||
<source>Selects the number of brake notches (5-8)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>USBBindingWidget</name>
|
||||
|
||||
@@ -533,7 +533,7 @@ bool GSHasDisplayWindow()
|
||||
return (g_gs_device->GetWindowInfo().type != WindowInfo::Type::Surfaceless);
|
||||
}
|
||||
|
||||
void GSResizeDisplayWindow(int width, int height, float scale)
|
||||
void GSResizeDisplayWindow(u32 width, u32 height, float scale)
|
||||
{
|
||||
g_gs_device->ResizeWindow(width, height, scale);
|
||||
ImGuiManager::WindowResized();
|
||||
|
||||
@@ -83,7 +83,7 @@ void GSThrottlePresentation();
|
||||
void GSGameChanged();
|
||||
void GSSetDisplayAlignment(GSDisplayAlignment alignment);
|
||||
bool GSHasDisplayWindow();
|
||||
void GSResizeDisplayWindow(int width, int height, float scale);
|
||||
void GSResizeDisplayWindow(u32 width, u32 height, float scale);
|
||||
void GSUpdateDisplayWindow();
|
||||
void GSSetVSyncMode(GSVSyncMode mode, bool allow_present_throttle);
|
||||
|
||||
|
||||
@@ -1019,7 +1019,7 @@ public:
|
||||
virtual bool UpdateWindow() = 0;
|
||||
|
||||
/// Call when the window size changes externally to recreate any resources.
|
||||
virtual void ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale) = 0;
|
||||
virtual void ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale) = 0;
|
||||
|
||||
/// Returns true if exclusive fullscreen is supported.
|
||||
virtual bool SupportsExclusiveFullscreen() const = 0;
|
||||
|
||||
@@ -278,7 +278,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
|
||||
for (size_t i = 0; i < std::size(m_merge.ps); i++)
|
||||
{
|
||||
const std::string entry_point(StringUtil::StdStringFromFormat("ps_main%d", i));
|
||||
const std::string entry_point(StringUtil::StdStringFromFormat("ps_main%zu", i));
|
||||
m_merge.ps[i] = m_shader_cache.GetPixelShader(m_dev.get(), *shader, nullptr, entry_point.c_str());
|
||||
if (!m_merge.ps[i])
|
||||
return false;
|
||||
@@ -312,7 +312,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
return false;
|
||||
for (size_t i = 0; i < std::size(m_interlace.ps); i++)
|
||||
{
|
||||
const std::string entry_point(StringUtil::StdStringFromFormat("ps_main%d", i));
|
||||
const std::string entry_point(StringUtil::StdStringFromFormat("ps_main%zu", i));
|
||||
m_interlace.ps[i] = m_shader_cache.GetPixelShader(m_dev.get(), *shader, nullptr, entry_point.c_str());
|
||||
if (!m_interlace.ps[i])
|
||||
return false;
|
||||
@@ -498,7 +498,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
|
||||
for (size_t i = 0; i < std::size(m_date.primid_init_ps); i++)
|
||||
{
|
||||
const std::string entry_point(StringUtil::StdStringFromFormat("ps_stencil_image_init_%d", i));
|
||||
const std::string entry_point(StringUtil::StdStringFromFormat("ps_stencil_image_init_%zu", i));
|
||||
m_date.primid_init_ps[i] = m_shader_cache.GetPixelShader(m_dev.get(), *convert_hlsl, nullptr, entry_point.c_str());
|
||||
if (!m_date.primid_init_ps[i])
|
||||
return false;
|
||||
@@ -893,7 +893,7 @@ std::string GSDevice11::GetDriverInfo() const
|
||||
return ret;
|
||||
}
|
||||
|
||||
void GSDevice11::ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale)
|
||||
void GSDevice11::ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale)
|
||||
{
|
||||
if (!m_swap_chain || m_is_exclusive_fullscreen)
|
||||
return;
|
||||
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
RenderAPI GetRenderAPI() const override;
|
||||
|
||||
bool UpdateWindow() override;
|
||||
void ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale) override;
|
||||
void ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale) override;
|
||||
bool SupportsExclusiveFullscreen() const override;
|
||||
bool HasSurface() const override;
|
||||
void DestroySurface() override;
|
||||
|
||||
@@ -1054,7 +1054,7 @@ std::string GSDevice12::GetDriverInfo() const
|
||||
return ret;
|
||||
}
|
||||
|
||||
void GSDevice12::ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale)
|
||||
void GSDevice12::ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale)
|
||||
{
|
||||
if (!m_swap_chain)
|
||||
return;
|
||||
|
||||
@@ -407,7 +407,7 @@ public:
|
||||
void Destroy() override;
|
||||
|
||||
bool UpdateWindow() override;
|
||||
void ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale) override;
|
||||
void ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale) override;
|
||||
bool SupportsExclusiveFullscreen() const override;
|
||||
void DestroySurface() override;
|
||||
std::string GetDriverInfo() const override;
|
||||
|
||||
@@ -385,7 +385,7 @@ public:
|
||||
bool SupportsExclusiveFullscreen() const override;
|
||||
std::string GetDriverInfo() const override;
|
||||
|
||||
void ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale) override;
|
||||
void ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale) override;
|
||||
|
||||
void UpdateTexture(id<MTLTexture> texture, u32 x, u32 y, u32 width, u32 height, const void* data, u32 data_stride);
|
||||
|
||||
|
||||
@@ -1267,11 +1267,11 @@ std::string GSDeviceMTL::GetDriverInfo() const
|
||||
return desc;
|
||||
}}
|
||||
|
||||
void GSDeviceMTL::ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale)
|
||||
void GSDeviceMTL::ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale)
|
||||
{
|
||||
m_window_info.surface_scale = new_window_scale;
|
||||
if (!m_layer ||
|
||||
(m_window_info.surface_width == static_cast<u32>(new_window_width) && m_window_info.surface_height == static_cast<u32>(new_window_height)))
|
||||
(m_window_info.surface_width == new_window_width && m_window_info.surface_height == new_window_height))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -888,17 +888,17 @@ bool GSDeviceOGL::UpdateWindow()
|
||||
return true;
|
||||
}
|
||||
|
||||
void GSDeviceOGL::ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale)
|
||||
void GSDeviceOGL::ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale)
|
||||
{
|
||||
m_window_info.surface_scale = new_window_scale;
|
||||
if (m_window_info.type == WindowInfo::Type::Surfaceless ||
|
||||
(m_window_info.surface_width == static_cast<u32>(new_window_width) &&
|
||||
m_window_info.surface_height == static_cast<u32>(new_window_height)))
|
||||
(m_window_info.surface_width == new_window_width &&
|
||||
m_window_info.surface_height == new_window_height))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_gl_context->ResizeSurface(static_cast<u32>(new_window_width), static_cast<u32>(new_window_height));
|
||||
m_gl_context->ResizeSurface(new_window_width, new_window_height);
|
||||
m_window_info = m_gl_context->GetWindowInfo();
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ public:
|
||||
void Destroy() override;
|
||||
|
||||
bool UpdateWindow() override;
|
||||
void ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale) override;
|
||||
void ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale) override;
|
||||
bool SupportsExclusiveFullscreen() const override;
|
||||
void DestroySurface() override;
|
||||
std::string GetDriverInfo() const override;
|
||||
|
||||
@@ -2216,12 +2216,12 @@ bool GSDeviceVK::UpdateWindow()
|
||||
return true;
|
||||
}
|
||||
|
||||
void GSDeviceVK::ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale)
|
||||
void GSDeviceVK::ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale)
|
||||
{
|
||||
m_resize_requested = false;
|
||||
|
||||
if (!m_swap_chain || (m_swap_chain->GetWidth() == static_cast<u32>(new_window_width) &&
|
||||
m_swap_chain->GetHeight() == static_cast<u32>(new_window_height)))
|
||||
if (!m_swap_chain || (m_swap_chain->GetWidth() == new_window_width &&
|
||||
m_swap_chain->GetHeight() == new_window_height))
|
||||
{
|
||||
// skip unnecessary resizes
|
||||
m_window_info.surface_scale = new_window_scale;
|
||||
|
||||
@@ -506,7 +506,7 @@ public:
|
||||
void Destroy() override;
|
||||
|
||||
bool UpdateWindow() override;
|
||||
void ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale) override;
|
||||
void ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale) override;
|
||||
bool SupportsExclusiveFullscreen() const override;
|
||||
void DestroySurface() override;
|
||||
std::string GetDriverInfo() const override;
|
||||
|
||||
@@ -946,7 +946,7 @@ void MTGS::ApplySettings()
|
||||
WaitGS(false, false, false);
|
||||
}
|
||||
|
||||
void MTGS::ResizeDisplayWindow(int width, int height, float scale)
|
||||
void MTGS::ResizeDisplayWindow(u32 width, u32 height, float scale)
|
||||
{
|
||||
pxAssertRel(IsOpen(), "MTGS is running");
|
||||
RunOnGSThread([width, height, scale]() {
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace MTGS
|
||||
void RunOnGSThread(AsyncCallType func);
|
||||
void GameChanged();
|
||||
void ApplySettings();
|
||||
void ResizeDisplayWindow(int width, int height, float scale);
|
||||
void ResizeDisplayWindow(u32 width, u32 height, float scale);
|
||||
void UpdateDisplayWindow();
|
||||
void SetVSyncMode(GSVSyncMode mode, bool allow_present_throttle);
|
||||
void UpdateVSyncMode();
|
||||
|
||||
@@ -37,6 +37,8 @@ namespace usb_pad
|
||||
TRANSLATE_NOOP("USB", "Type 2"),
|
||||
TRANSLATE_NOOP("USB", "Shinkansen"),
|
||||
TRANSLATE_NOOP("USB", "Ryojōhen"),
|
||||
TRANSLATE_NOOP("USB", "Train Mascon"),
|
||||
TRANSLATE_NOOP("USB", "Master Controller"),
|
||||
};
|
||||
return subtypes;
|
||||
}
|
||||
@@ -63,6 +65,14 @@ namespace usb_pad
|
||||
CID_TC_L = CID_TC_C,
|
||||
CID_TC_R = CID_TC_D,
|
||||
|
||||
// Train Mascon
|
||||
CID_TC_ATS = CID_TC_D,
|
||||
CID_TC_CLOSE = CID_TC_CAMERA,
|
||||
CID_TC_POWER_UP,
|
||||
CID_TC_POWER_DOWN,
|
||||
CID_TC_REVERSER_UP,
|
||||
CID_TC_REVERSER_DOWN,
|
||||
|
||||
BUTTONS_OFFSET = CID_TC_B,
|
||||
};
|
||||
|
||||
@@ -110,6 +120,43 @@ namespace usb_pad
|
||||
|
||||
return bindings;
|
||||
}
|
||||
case TRAIN_MASCON:
|
||||
{
|
||||
static constexpr const InputBindingInfo bindings[] = {
|
||||
{"PowerUp", TRANSLATE_NOOP("USB", "Power Up"), nullptr, InputBindingInfo::Type::Button, CID_TC_POWER_UP, GenericInputBinding::R1},
|
||||
{"PowerDown", TRANSLATE_NOOP("USB", "Power Down"), nullptr, InputBindingInfo::Type::Button, CID_TC_POWER_DOWN, GenericInputBinding::L1},
|
||||
{"ReverserUp", TRANSLATE_NOOP("USB", "Reverser Up"), nullptr, InputBindingInfo::Type::Button, CID_TC_REVERSER_UP, GenericInputBinding::R2},
|
||||
{"ReverserDown", TRANSLATE_NOOP("USB", "Reverser Down"), nullptr, InputBindingInfo::Type::Button, CID_TC_REVERSER_DOWN, GenericInputBinding::L2},
|
||||
|
||||
{"Up", TRANSLATE_NOOP("USB", "D-Pad Up"), ICON_PF_DPAD_UP, InputBindingInfo::Type::Button, CID_TC_UP, GenericInputBinding::DPadUp},
|
||||
{"Down", TRANSLATE_NOOP("USB", "D-Pad Down"), ICON_PF_DPAD_DOWN, InputBindingInfo::Type::Button, CID_TC_DOWN, GenericInputBinding::DPadDown},
|
||||
{"Left", TRANSLATE_NOOP("USB", "D-Pad Left"), ICON_PF_DPAD_LEFT, InputBindingInfo::Type::Button, CID_TC_LEFT, GenericInputBinding::DPadLeft},
|
||||
{"Right", TRANSLATE_NOOP("USB", "D-Pad Right"), ICON_PF_DPAD_RIGHT, InputBindingInfo::Type::Button, CID_TC_RIGHT, GenericInputBinding::DPadRight},
|
||||
|
||||
{"ATS", TRANSLATE_NOOP("USB", "ATS"), nullptr, InputBindingInfo::Type::Button, CID_TC_ATS, GenericInputBinding::Triangle},
|
||||
{"Close", TRANSLATE_NOOP("USB", "Close"), nullptr, InputBindingInfo::Type::Button, CID_TC_CLOSE, GenericInputBinding::R3},
|
||||
{"A", TRANSLATE_NOOP("USB", "A Button"), ICON_PF_KEY_A, InputBindingInfo::Type::Button, CID_TC_A, GenericInputBinding::Square},
|
||||
{"B", TRANSLATE_NOOP("USB", "B Button"), ICON_PF_KEY_B, InputBindingInfo::Type::Button, CID_TC_B, GenericInputBinding::Cross},
|
||||
{"C", TRANSLATE_NOOP("USB", "C Button"), ICON_PF_KEY_C, InputBindingInfo::Type::Button, CID_TC_C, GenericInputBinding::Circle},
|
||||
{"Select", TRANSLATE_NOOP("USB", "Select"), ICON_PF_SELECT_SHARE, InputBindingInfo::Type::Button, CID_TC_SELECT, GenericInputBinding::Select},
|
||||
{"Start", TRANSLATE_NOOP("USB", "Start"), ICON_PF_START, InputBindingInfo::Type::Button, CID_TC_START, GenericInputBinding::Start},
|
||||
};
|
||||
return bindings;
|
||||
}
|
||||
case MASTER_CONTROLLER:
|
||||
{
|
||||
static constexpr const InputBindingInfo bindings[] = {
|
||||
{"PowerUp", TRANSLATE_NOOP("USB", "Power Up"), nullptr, InputBindingInfo::Type::Button, CID_TC_POWER_UP, GenericInputBinding::R1},
|
||||
{"PowerDown", TRANSLATE_NOOP("USB", "Power Down"), nullptr, InputBindingInfo::Type::Button, CID_TC_POWER_DOWN, GenericInputBinding::L1},
|
||||
{"ReverserUp", TRANSLATE_NOOP("USB", "Reverser Up"), nullptr, InputBindingInfo::Type::Button, CID_TC_REVERSER_UP, GenericInputBinding::R2},
|
||||
{"ReverserDown", TRANSLATE_NOOP("USB", "Reverser Down"), nullptr, InputBindingInfo::Type::Button, CID_TC_REVERSER_DOWN, GenericInputBinding::L2},
|
||||
{"S", TRANSLATE_NOOP("USB", "S"), ICON_PF_KEY_S, InputBindingInfo::Type::Button, CID_TC_D, GenericInputBinding::Cross},
|
||||
{"A", TRANSLATE_NOOP("USB", "A"), ICON_PF_KEY_A, InputBindingInfo::Type::Button, CID_TC_A, GenericInputBinding::Square},
|
||||
{"B", TRANSLATE_NOOP("USB", "B"), ICON_PF_KEY_B, InputBindingInfo::Type::Button, CID_TC_B, GenericInputBinding::Triangle},
|
||||
{"C", TRANSLATE_NOOP("USB", "C"), ICON_PF_KEY_C, InputBindingInfo::Type::Button, CID_TC_C, GenericInputBinding::Circle},
|
||||
};
|
||||
return bindings;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -151,21 +198,66 @@ namespace usb_pad
|
||||
{
|
||||
TrainDeviceState* s = USB_CONTAINER_OF(dev, TrainDeviceState, dev);
|
||||
|
||||
s->passthrough = USB::GetConfigBool(si, s->port, TypeName(), "Passthrough", false);
|
||||
switch (s->type)
|
||||
{
|
||||
case TRAIN_TYPE2:
|
||||
case TRAIN_SHINKANSEN:
|
||||
case TRAIN_RYOJOUHEN:
|
||||
s->passthrough = USB::GetConfigBool(si, s->port, TypeName(), "Passthrough", false);
|
||||
break;
|
||||
case MASTER_CONTROLLER:
|
||||
s->power_notches = USB::GetConfigInt(si, s->port, TypeName(), "power_notches", 5);
|
||||
s->brake_notches = USB::GetConfigInt(si, s->port, TypeName(), "brake_notches", 8);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
std::span<const SettingInfo> TrainDevice::Settings(u32 subtype) const
|
||||
{
|
||||
static constexpr const SettingInfo passthrough = {
|
||||
SettingInfo::Type::Boolean,
|
||||
"Passthrough",
|
||||
TRANSLATE_NOOP("USB", "Axes Passthrough"),
|
||||
TRANSLATE_NOOP("USB", "Passes through the unprocessed input axis to the game. Enable if you are using a compatible Densha De Go! controller. Disable if you are using any other joystick."),
|
||||
"false",
|
||||
};
|
||||
|
||||
static constexpr const SettingInfo info[] = {passthrough};
|
||||
return info;
|
||||
switch (subtype)
|
||||
{
|
||||
case TRAIN_TYPE2:
|
||||
case TRAIN_SHINKANSEN:
|
||||
case TRAIN_RYOJOUHEN:
|
||||
{
|
||||
static constexpr const SettingInfo info[] = {
|
||||
{
|
||||
.type = SettingInfo::Type::Boolean,
|
||||
.name = "Passthrough",
|
||||
.display_name = TRANSLATE_NOOP("USB", "Axes Passthrough"),
|
||||
.description = TRANSLATE_NOOP("USB", "Passes through the unprocessed input axis to the game. Enable if you are using a compatible Densha De Go! controller. Disable if you are using any other joystick."),
|
||||
.default_value = "false",
|
||||
}
|
||||
};
|
||||
return info;
|
||||
}
|
||||
case MASTER_CONTROLLER:
|
||||
{
|
||||
static constexpr const SettingInfo info[] = {
|
||||
{
|
||||
.type = SettingInfo::Type::Integer,
|
||||
.name = "power_notches",
|
||||
.display_name = TRANSLATE_NOOP("USB", "Power notches"),
|
||||
.description = TRANSLATE_NOOP("USB", "Selects the number of power notches (3-6)"),
|
||||
.default_value = "5",
|
||||
.min_value = "3",
|
||||
.max_value = "6",
|
||||
},
|
||||
{
|
||||
.type = SettingInfo::Type::Integer,
|
||||
.name = "brake_notches",
|
||||
.display_name = TRANSLATE_NOOP("USB", "Brake notches"),
|
||||
.description = TRANSLATE_NOOP("USB", "Selects the number of brake notches (5-8)"),
|
||||
.default_value = "8",
|
||||
.min_value = "5",
|
||||
.max_value = "8",
|
||||
}
|
||||
};
|
||||
return info;
|
||||
}
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
static constexpr u32 button_mask(u32 bind_index)
|
||||
@@ -173,7 +265,7 @@ namespace usb_pad
|
||||
return (1u << (bind_index - TrainControlID::BUTTONS_OFFSET));
|
||||
}
|
||||
|
||||
static constexpr u8 button_at(u8 value, u32 index)
|
||||
static constexpr u16 button_at(u16 value, u32 index)
|
||||
{
|
||||
return value & button_mask(index);
|
||||
}
|
||||
@@ -205,6 +297,10 @@ namespace usb_pad
|
||||
case CID_TC_SELECT:
|
||||
case CID_TC_START:
|
||||
case CID_TC_CAMERA:
|
||||
case CID_TC_POWER_UP:
|
||||
case CID_TC_POWER_DOWN:
|
||||
case CID_TC_REVERSER_UP:
|
||||
case CID_TC_REVERSER_DOWN:
|
||||
{
|
||||
return (button_at(s->data.buttons, bind_index) != 0u) ? 1.0f : 0.0f;
|
||||
}
|
||||
@@ -251,14 +347,18 @@ namespace usb_pad
|
||||
case CID_TC_SELECT:
|
||||
case CID_TC_START:
|
||||
case CID_TC_CAMERA:
|
||||
case CID_TC_POWER_UP:
|
||||
case CID_TC_POWER_DOWN:
|
||||
case CID_TC_REVERSER_UP:
|
||||
case CID_TC_REVERSER_DOWN:
|
||||
{
|
||||
const u32 mask = button_mask(bind_index);
|
||||
if (value >= 0.5f)
|
||||
s->data.buttons |= mask;
|
||||
else
|
||||
s->data.buttons &= ~mask;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
@@ -452,11 +552,23 @@ namespace usb_pad
|
||||
return (get_ab(buttons) | (button_at(buttons, CID_TC_CAMERA) >> 4) | ((get_cd(buttons) | get_ss(buttons)) << 1));
|
||||
}
|
||||
|
||||
void TrainDeviceState::UpdateHandles(u8 max_power, u8 max_brake)
|
||||
{
|
||||
if (!button_at(prev_buttons, CID_TC_POWER_UP) && button_at(data.buttons, CID_TC_POWER_UP) && handle < max_brake + 1 + max_power)
|
||||
handle++;
|
||||
if (!button_at(prev_buttons, CID_TC_POWER_DOWN) && button_at(data.buttons, CID_TC_POWER_DOWN) && handle > 0)
|
||||
handle--;
|
||||
if (!button_at(prev_buttons, CID_TC_REVERSER_UP) && button_at(data.buttons, CID_TC_REVERSER_UP) && reverser < 2)
|
||||
reverser++;
|
||||
if (!button_at(prev_buttons, CID_TC_REVERSER_DOWN) && button_at(data.buttons, CID_TC_REVERSER_DOWN) && reverser > 0)
|
||||
reverser--;
|
||||
}
|
||||
|
||||
static void train_handle_data(USBDevice* dev, USBPacket* p)
|
||||
{
|
||||
TrainDeviceState* s = USB_CONTAINER_OF(dev, TrainDeviceState, dev);
|
||||
|
||||
if (p->pid != USB_TOKEN_IN || p->ep->nr != 1)
|
||||
if (s->type < MASTER_CONTROLLER && (p->pid != USB_TOKEN_IN || p->ep->nr != 1))
|
||||
{
|
||||
Console.Error("Unhandled TrainController request pid=%d ep=%u", p->pid, p->ep->nr);
|
||||
p->status = USB_RET_STALL;
|
||||
@@ -501,6 +613,77 @@ namespace usb_pad
|
||||
usb_packet_copy(p, &out, sizeof(out));
|
||||
break;
|
||||
}
|
||||
case TRAIN_MASCON:
|
||||
{
|
||||
s->UpdateHandles(5, 6);
|
||||
s->prev_buttons = s->data.buttons;
|
||||
|
||||
TrainConData_TrainMascon out = {};
|
||||
out.one = 0x01;
|
||||
out.handle = 1 + s->handle;
|
||||
out.reverser = s->reverser < 2 ? !s->reverser : s->reverser;
|
||||
out.ats = !!button_at(s->data.buttons, CID_TC_ATS);
|
||||
out.close = !!button_at(s->data.buttons, CID_TC_CLOSE);
|
||||
out.button_a_soft = !!button_at(s->data.buttons, CID_TC_A);
|
||||
out.button_a_hard = !!button_at(s->data.buttons, CID_TC_A);
|
||||
out.button_b = !!button_at(s->data.buttons, CID_TC_B);
|
||||
out.button_c = !!button_at(s->data.buttons, CID_TC_C);
|
||||
out.start = !!button_at(s->data.buttons, CID_TC_START);
|
||||
out.select = !!button_at(s->data.buttons, CID_TC_SELECT);
|
||||
out.dpad_up = s->data.hat_up;
|
||||
out.dpad_down = s->data.hat_down;
|
||||
out.dpad_left = s->data.hat_left;
|
||||
out.dpad_right = s->data.hat_right;
|
||||
usb_packet_copy(p, &out, sizeof(out));
|
||||
break;
|
||||
}
|
||||
case MASTER_CONTROLLER:
|
||||
{
|
||||
if (p->ep->nr == 1) // interrupt in
|
||||
{
|
||||
p->status = USB_RET_STALL;
|
||||
break;
|
||||
}
|
||||
else if (p->ep->nr == 2) // bulk out
|
||||
{
|
||||
// The game sends a reset command after ~1500ms without updates. Resend the status during the next transfer
|
||||
s->last_handle = -1;
|
||||
s->last_reverser = -1;
|
||||
break;
|
||||
} // else bulk in
|
||||
|
||||
s->UpdateHandles(s->power_notches, s->brake_notches);
|
||||
|
||||
char data[100];
|
||||
std::memset(data, 0, sizeof(data));
|
||||
u8 pos = 0;
|
||||
|
||||
if (s->last_handle != s->handle)
|
||||
{
|
||||
pos += snprintf(data + pos, sizeof(data) - pos, "%s\x0d", s->mc_handle[s->handle + 8 - s->brake_notches]);
|
||||
s->last_handle = s->handle;
|
||||
}
|
||||
if (s->last_reverser != s->reverser)
|
||||
{
|
||||
pos += snprintf(data + pos, sizeof(data) - pos, "%s\x0d", s->mc_reverser[s->reverser]);
|
||||
s->last_reverser = s->reverser;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (!button_at(s->prev_buttons, BUTTONS_OFFSET + i) && button_at(s->data.buttons, BUTTONS_OFFSET + i))
|
||||
{
|
||||
pos += snprintf(data + pos, sizeof(data) - pos, "%s\x0d", s->mc_button_pressed[i]);
|
||||
}
|
||||
if (button_at(s->prev_buttons, BUTTONS_OFFSET + i) && !button_at(s->data.buttons, BUTTONS_OFFSET + i))
|
||||
{
|
||||
pos += snprintf(data + pos, sizeof(data) - pos, "%s\x0d", s->mc_button_released[i]);
|
||||
}
|
||||
}
|
||||
s->prev_buttons = s->data.buttons;
|
||||
usb_packet_copy(p, data, std::min<u16>(p->buffer_size, pos));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
Console.Error("Unhandled TrainController USB_TOKEN_IN pid=%d ep=%u type=%u", p->pid, p->ep->nr, s->type);
|
||||
p->status = USB_RET_IOERROR;
|
||||
@@ -520,25 +703,42 @@ namespace usb_pad
|
||||
s->desc.str = dct01_desc_strings;
|
||||
if (usb_desc_parse_dev(dct01_dev_descriptor, sizeof(dct01_dev_descriptor), s->desc, s->desc_dev) < 0)
|
||||
goto fail;
|
||||
if (usb_desc_parse_config(taito_denshacon_config_descriptor, sizeof(taito_denshacon_config_descriptor), s->desc_dev) < 0)
|
||||
goto fail;
|
||||
break;
|
||||
case TRAIN_SHINKANSEN:
|
||||
s->desc.str = dct02_desc_strings;
|
||||
if (usb_desc_parse_dev(dct02_dev_descriptor, sizeof(dct02_dev_descriptor), s->desc, s->desc_dev) < 0)
|
||||
goto fail;
|
||||
if (usb_desc_parse_config(taito_denshacon_config_descriptor, sizeof(taito_denshacon_config_descriptor), s->desc_dev) < 0)
|
||||
goto fail;
|
||||
break;
|
||||
case TRAIN_RYOJOUHEN:
|
||||
s->desc.str = dct03_desc_strings;
|
||||
if (usb_desc_parse_dev(dct03_dev_descriptor, sizeof(dct03_dev_descriptor), s->desc, s->desc_dev) < 0)
|
||||
goto fail;
|
||||
if (usb_desc_parse_config(taito_denshacon_config_descriptor, sizeof(taito_denshacon_config_descriptor), s->desc_dev) < 0)
|
||||
goto fail;
|
||||
break;
|
||||
case TRAIN_MASCON:
|
||||
s->desc.str = dct03_desc_strings;
|
||||
if (usb_desc_parse_dev(train_mascon_dev_descriptor, sizeof(train_mascon_dev_descriptor), s->desc, s->desc_dev) < 0)
|
||||
goto fail;
|
||||
if (usb_desc_parse_config(train_mascon_config_descriptor, sizeof(train_mascon_config_descriptor), s->desc_dev) < 0)
|
||||
goto fail;
|
||||
break;
|
||||
case MASTER_CONTROLLER:
|
||||
s->desc.str = dct03_desc_strings;
|
||||
if (usb_desc_parse_dev(master_controller_dev_descriptor, sizeof(master_controller_dev_descriptor), s->desc, s->desc_dev) < 0)
|
||||
goto fail;
|
||||
if (usb_desc_parse_config(master_controller_config_descriptor, sizeof(master_controller_config_descriptor), s->desc_dev) < 0)
|
||||
goto fail;
|
||||
break;
|
||||
|
||||
default:
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (usb_desc_parse_config(taito_denshacon_config_descriptor, sizeof(taito_denshacon_config_descriptor), s->desc_dev) < 0)
|
||||
goto fail;
|
||||
|
||||
s->dev.speed = USB_SPEED_FULL;
|
||||
s->dev.klass.handle_attach = usb_desc_attach;
|
||||
s->dev.klass.handle_reset = train_handle_reset;
|
||||
|
||||
@@ -11,10 +11,11 @@ namespace usb_pad
|
||||
{
|
||||
enum TrainDeviceTypes
|
||||
{
|
||||
TRAIN_TYPE2, // TCPP20009 or similar
|
||||
TRAIN_SHINKANSEN, // TCPP20011
|
||||
TRAIN_RYOJOUHEN, // TCPP20014
|
||||
TRAIN_COUNT,
|
||||
TRAIN_TYPE2, // TCPP-20009 or similar
|
||||
TRAIN_SHINKANSEN, // TCPP-20011
|
||||
TRAIN_RYOJOUHEN, // TCPP-20014
|
||||
TRAIN_MASCON, // COTM-02001
|
||||
MASTER_CONTROLLER, // VOK-00105 or VOK-00106 with OGCW-10001 adapter
|
||||
};
|
||||
|
||||
class TrainDevice final : public DeviceProxy
|
||||
@@ -39,7 +40,7 @@ namespace usb_pad
|
||||
u8 control;
|
||||
u8 brake;
|
||||
u8 power;
|
||||
u8 horn;
|
||||
u8 horn; // pedal
|
||||
u8 hat;
|
||||
u8 buttons;
|
||||
};
|
||||
@@ -49,7 +50,7 @@ namespace usb_pad
|
||||
{
|
||||
u8 brake;
|
||||
u8 power;
|
||||
u8 horn;
|
||||
u8 horn; // pedal
|
||||
u8 hat;
|
||||
u8 buttons;
|
||||
u8 pad;
|
||||
@@ -60,12 +61,37 @@ namespace usb_pad
|
||||
{
|
||||
u8 brake;
|
||||
u8 power;
|
||||
u8 horn;
|
||||
u8 horn; // pedal
|
||||
u8 hat;
|
||||
u8 buttons;
|
||||
u8 pad[3];
|
||||
};
|
||||
static_assert(sizeof(TrainConData_Ryojouhen) == 8);
|
||||
|
||||
struct TrainConData_TrainMascon
|
||||
{
|
||||
u8 one;
|
||||
|
||||
u8 handle : 4;
|
||||
u8 reverser : 4;
|
||||
|
||||
u8 ats : 1;
|
||||
u8 close : 1;
|
||||
u8 button_a_soft : 1;
|
||||
u8 button_a_hard : 1;
|
||||
u8 button_b : 1;
|
||||
u8 button_c : 1;
|
||||
u8 : 2;
|
||||
|
||||
u8 start : 1;
|
||||
u8 select : 1;
|
||||
u8 dpad_up : 1;
|
||||
u8 dpad_down : 1;
|
||||
u8 dpad_left : 1;
|
||||
u8 dpad_right : 1;
|
||||
u8 : 2;
|
||||
};
|
||||
static_assert(sizeof(TrainConData_TrainMascon) == 4);
|
||||
#pragma pack(pop)
|
||||
|
||||
struct TrainDeviceState
|
||||
@@ -75,6 +101,7 @@ namespace usb_pad
|
||||
|
||||
void Reset();
|
||||
void UpdateHatSwitch() noexcept;
|
||||
void UpdateHandles(u8 max_power, u8 max_brake);
|
||||
|
||||
USBDevice dev{};
|
||||
USBDesc desc{};
|
||||
@@ -95,12 +122,24 @@ namespace usb_pad
|
||||
u8 power; // 255 is fully applied
|
||||
u8 brake; // 255 is fully applied
|
||||
u8 hatswitch; // direction
|
||||
u8 buttons; // active high
|
||||
u16 buttons; // active high
|
||||
} data = {};
|
||||
|
||||
// Master Controller
|
||||
const char* mc_handle[16] = {"TSB20", "TSB30", "TSB40", "TSE99", "TSA05", "TSA15", "TSA25", "TSA35", "TSA45", "TSA50", "TSA55", "TSA65", "TSA75", "TSA85", "TSA95", "TSB60"};
|
||||
const char* mc_reverser[3] = {"TSG00", "TSG50", "TSG99"};
|
||||
const char* mc_button_pressed[4] = {"TSY99", "TSX99", "TSZ99", "TSK99"};
|
||||
const char* mc_button_released[4] = {"TSY00", "TSX00", "TSZ00", "TSK00"};
|
||||
u8 power_notches;
|
||||
u8 brake_notches;
|
||||
|
||||
u16 prev_buttons;
|
||||
s8 last_handle = -1, handle = 0;
|
||||
s8 last_reverser = -1, reverser = 1;
|
||||
};
|
||||
|
||||
// Taito Densha Controllers as described at:
|
||||
// https://marcriera.github.io/ddgo-controller-docs/controllers/usb/
|
||||
// https://traincontrollerdb.marcriera.cat/hardware/#usb
|
||||
#define DEFINE_DCT_DEV_DESCRIPTOR(prefix, subclass, product) \
|
||||
static const uint8_t prefix##_dev_descriptor[] = { \
|
||||
/* bLength */ USB_DEVICE_DESC_SIZE, \
|
||||
@@ -185,4 +224,114 @@ namespace usb_pad
|
||||
// dct03_dev_descriptor
|
||||
DEFINE_DCT_DEV_DESCRIPTOR(dct03, 0xFF, 0x0007);
|
||||
|
||||
// ---- Train Mascon ----
|
||||
|
||||
static const uint8_t train_mascon_dev_descriptor[] = {
|
||||
0x12, // bLength
|
||||
0x01, // bDescriptorType (Device)
|
||||
0x10, 0x01, // bcdUSB 1.10
|
||||
0x00, // bDeviceClass (Use class information in the Interface Descriptors)
|
||||
0x00, // bDeviceSubClass
|
||||
0x00, // bDeviceProtocol
|
||||
0x08, // bMaxPacketSize0 8
|
||||
0x06, 0x1C, // idVendor 0x1C06
|
||||
0xA7, 0x77, // idProduct 0x77A7
|
||||
0x02, 0x02, // bcdDevice 2.02
|
||||
0x01, // iManufacturer (String Index)
|
||||
0x02, // iProduct (String Index)
|
||||
0x03, // iSerialNumber (String Index)
|
||||
0x01, // bNumConfigurations 1
|
||||
};
|
||||
|
||||
static const uint8_t train_mascon_config_descriptor[] = {
|
||||
0x09, // bLength
|
||||
0x02, // bDescriptorType (Configuration)
|
||||
0x19, 0x00, // wTotalLength 25
|
||||
0x01, // bNumInterfaces 1
|
||||
0x01, // bConfigurationValue
|
||||
0x04, // iConfiguration (String Index)
|
||||
0xA0, // bmAttributes Remote Wakeup
|
||||
0x32, // bMaxPower 100mA
|
||||
|
||||
0x09, // bLength
|
||||
0x04, // bDescriptorType (Interface)
|
||||
0x00, // bInterfaceNumber 0
|
||||
0x00, // bAlternateSetting
|
||||
0x01, // bNumEndpoints 1
|
||||
0x00, // bInterfaceClass
|
||||
0x00, // bInterfaceSubClass
|
||||
0x00, // bInterfaceProtocol
|
||||
0x00, // iInterface (String Index)
|
||||
|
||||
0x07, // bLength
|
||||
0x05, // bDescriptorType (Endpoint)
|
||||
0x81, // bEndpointAddress (IN/D2H)
|
||||
0x03, // bmAttributes (Interrupt)
|
||||
0x08, 0x00, // wMaxPacketSize 8
|
||||
0x14, // bInterval 20 (unit depends on device speed)
|
||||
};
|
||||
|
||||
// ---- Master Controller ----
|
||||
// Implements a generic PL2303 adapter.
|
||||
// Replace with official OGCW-10001 descriptors when available.
|
||||
|
||||
static const uint8_t master_controller_dev_descriptor[] = {
|
||||
0x12, // bLength
|
||||
0x01, // bDescriptorType (Device)
|
||||
0x10, 0x01, // bcdUSB 1.10
|
||||
0x00, // bDeviceClass (Use class information in the Interface Descriptors)
|
||||
0x00, // bDeviceSubClass
|
||||
0x00, // bDeviceProtocol
|
||||
0x40, // bMaxPacketSize0 64
|
||||
0x7B, 0x06, // idVendor 0x067B
|
||||
0x03, 0x23, // idProduct 0x2303
|
||||
0x00, 0x03, // bcdDevice 3.00
|
||||
0x01, // iManufacturer (String Index)
|
||||
0x02, // iProduct (String Index)
|
||||
0x00, // iSerialNumber (String Index)
|
||||
0x01, // bNumConfigurations 1
|
||||
};
|
||||
|
||||
static const uint8_t master_controller_config_descriptor[] = {
|
||||
0x09, // bLength
|
||||
0x02, // bDescriptorType (Configuration)
|
||||
0x27, 0x00, // wTotalLength 39
|
||||
0x01, // bNumInterfaces 1
|
||||
0x01, // bConfigurationValue
|
||||
0x00, // iConfiguration (String Index)
|
||||
0x80, // bmAttributes
|
||||
0x32, // bMaxPower 100mA
|
||||
|
||||
0x09, // bLength
|
||||
0x04, // bDescriptorType (Interface)
|
||||
0x00, // bInterfaceNumber 0
|
||||
0x00, // bAlternateSetting
|
||||
0x03, // bNumEndpoints 3
|
||||
0xFF, // bInterfaceClass
|
||||
0x00, // bInterfaceSubClass
|
||||
0x00, // bInterfaceProtocol
|
||||
0x00, // iInterface (String Index)
|
||||
|
||||
0x07, // bLength
|
||||
0x05, // bDescriptorType (Endpoint)
|
||||
0x81, // bEndpointAddress (IN/D2H)
|
||||
0x03, // bmAttributes (Interrupt)
|
||||
0x0A, 0x00, // wMaxPacketSize 10
|
||||
0x01, // bInterval 1 (unit depends on device speed)
|
||||
|
||||
0x07, // bLength
|
||||
0x05, // bDescriptorType (Endpoint)
|
||||
0x02, // bEndpointAddress (OUT/H2D)
|
||||
0x02, // bmAttributes (Bulk)
|
||||
0x40, 0x00, // wMaxPacketSize 64
|
||||
0x00, // bInterval 0 (unit depends on device speed)
|
||||
|
||||
0x07, // bLength
|
||||
0x05, // bDescriptorType (Endpoint)
|
||||
0x83, // bEndpointAddress (IN/D2H)
|
||||
0x02, // bmAttributes (Bulk)
|
||||
0x40, 0x00, // wMaxPacketSize 64
|
||||
0x00, // bInterval 0 (unit depends on device speed)
|
||||
};
|
||||
|
||||
} // namespace usb_pad
|
||||
|
||||
Reference in New Issue
Block a user