Skip to content

Commit 509e744

Browse files
committed
Add toggle for adapter poll rate warning
1 parent 69014b5 commit 509e744

File tree

5 files changed

+26
-15
lines changed

5 files changed

+26
-15
lines changed

Source/Core/Core/Config/MainSettings.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ const Info<bool> MAIN_USE_HIGH_CONTRAST_TOOLTIPS{
411411
const Info<bool> MAIN_USE_PANIC_HANDLERS{{System::Main, "Interface", "UsePanicHandlers"}, false};
412412
const Info<bool> MAIN_ABORT_ON_PANIC_ALERT{{System::Main, "Interface", "AbortOnPanicAlert"}, false};
413413
const Info<bool> MAIN_OSD_MESSAGES{{System::Main, "Interface", "OnScreenDisplayMessages"}, true};
414+
const Info<bool> MAIN_SHOW_ADAPTER_WARNING{{System::Main, "Interface", "ShowAdapterWarning"}, true};
414415
const Info<bool> MAIN_SKIP_NKIT_WARNING{{System::Main, "Interface", "SkipNKitWarning"}, false};
415416
const Info<bool> MAIN_CONFIRM_ON_STOP{{System::Main, "Interface", "ConfirmStop"}, false};
416417
const Info<ShowCursor> MAIN_SHOW_CURSOR{{System::Main, "Interface", "CursorVisibility"},

Source/Core/Core/Config/MainSettings.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ extern const Info<bool> MAIN_USE_HIGH_CONTRAST_TOOLTIPS;
239239
extern const Info<bool> MAIN_USE_PANIC_HANDLERS;
240240
extern const Info<bool> MAIN_ABORT_ON_PANIC_ALERT;
241241
extern const Info<bool> MAIN_OSD_MESSAGES;
242+
extern const Info<bool> MAIN_SHOW_ADAPTER_WARNING;
242243
extern const Info<bool> MAIN_SKIP_NKIT_WARNING;
243244
extern const Info<bool> MAIN_CONFIRM_ON_STOP;
244245

Source/Core/DolphinQt/Settings/InterfacePane.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ void InterfacePane::CreateInGame()
198198
new ConfigBool(tr("Use Panic Handlers"), Config::MAIN_USE_PANIC_HANDLERS);
199199
m_checkbox_enable_osd =
200200
new ConfigBool(tr("Show On-Screen Display Messages"), Config::MAIN_OSD_MESSAGES);
201+
m_checkbox_adapter_warning =
202+
new ConfigBool(tr("Show Adapter Poll Rate Warning"), Config::MAIN_SHOW_ADAPTER_WARNING);
201203
m_checkbox_show_active_title =
202204
new ConfigBool(tr("Show Active Title in Window Title"), Config::MAIN_SHOW_ACTIVE_TITLE);
203205
m_checkbox_pause_on_focus_lost =
@@ -228,6 +230,7 @@ void InterfacePane::CreateInGame()
228230
groupbox_layout->addWidget(m_checkbox_confirm_on_stop);
229231
groupbox_layout->addWidget(m_checkbox_use_panic_handlers);
230232
groupbox_layout->addWidget(m_checkbox_enable_osd);
233+
groupbox_layout->addWidget(m_checkbox_adapter_warning);
231234
groupbox_layout->addWidget(m_checkbox_show_active_title);
232235
groupbox_layout->addWidget(m_checkbox_pause_on_focus_lost);
233236
groupbox_layout->addWidget(mouse_groupbox);
@@ -372,6 +375,11 @@ void InterfacePane::AddDescriptions()
372375
QT_TR_NOOP("Shows on-screen display messages over the render window. These messages "
373376
"disappear after several seconds."
374377
"<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
378+
static constexpr char TR_ADAPTER_WARNING_DESCRIPTION[] =
379+
QT_TR_NOOP("This setting makes Dolphin warn and show a message when inputs are being read at a reduced rate when an adapter problem is detected."
380+
" This should only occur when your adapter returns something other than LIBUSB_SUCCESS."
381+
" Before turning this off, try reinstalling drivers and switching USB ports."
382+
"<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
375383
static constexpr char TR_SHOW_ACTIVE_TITLE_DESCRIPTION[] =
376384
QT_TR_NOOP("Shows the active game title in the render window's title bar."
377385
"<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
@@ -420,6 +428,8 @@ void InterfacePane::AddDescriptions()
420428
m_checkbox_use_panic_handlers->SetDescription(tr(TR_USE_PANIC_HANDLERS_DESCRIPTION));
421429

422430
m_checkbox_enable_osd->SetDescription(tr(TR_ENABLE_OSD_DESCRIPTION));
431+
432+
m_checkbox_adapter_warning->SetDescription(tr(TR_ADAPTER_WARNING_DESCRIPTION));
423433

424434
m_checkbox_show_active_title->SetDescription(tr(TR_SHOW_ACTIVE_TITLE_DESCRIPTION));
425435

Source/Core/DolphinQt/Settings/InterfacePane.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class InterfacePane final : public QWidget
5454
ConfigBool* m_checkbox_confirm_on_stop;
5555
ConfigBool* m_checkbox_use_panic_handlers;
5656
ConfigBool* m_checkbox_enable_osd;
57+
ConfigBool* m_checkbox_adapter_warning;
5758
ConfigBool* m_checkbox_show_active_title;
5859
ConfigBool* m_checkbox_pause_on_focus_lost;
5960
ConfigRadioInt* m_radio_cursor_visible_movement;

Source/Core/VideoCommon/OnScreenUI.cpp

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -333,27 +333,25 @@ void OnScreenUI::DrawDebugText()
333333
ImGui::TextUnformatted(profile_output.c_str());
334334

335335
// P+ change: warn if adapter is being read at reduced rate
336-
if (GCAdapter::IsReadingAtReducedRate())
336+
if (GCAdapter::IsReadingAtReducedRate() && Config::Get(Config::MAIN_SHOW_ADAPTER_WARNING))
337337
{
338338
ImGui::TextWrapped(
339-
"Your GameCube Controller Adapter is reading inputs at a reduced rate.\n"
340-
"You can still play normally but you will experience higher input lag.\n"
341-
"This indicates a potential hardware issue.\n"
342-
"\n"
343-
"Go to the Dolphin -> Controllers page, click 'Configure' next to your "
344-
"controller's port, then check what your pollrate is."
345-
"\n"
346-
"If it is considerably lower than 125 hz, keep trying different USB ports until it "
347-
"is around 125 hz."
348-
"\n"
349-
"For more help, please ask in the official P+ Discord server.");
339+
"Your GameCube Controller Adapter is reading inputs at a reduced rate.\n"
340+
"You can still play normally but you will experience higher input lag.\n"
341+
"This indicates a potential hardware or driver issue.\n"
342+
"\n"
343+
"If you're using a computer with an AMD Ryzen processor:\n"
344+
"Try connecting the black plug of your adapter to a USB 3.0/3.1 Gen 1 port on your motherboard.\n"
345+
"These ports are usually blue or say \"SS\" (SuperSpeed). USB 3.2 (light blue) or USB 2.0 (black) will NOT work.\n"
346+
"\n"
347+
"The recommended driver on Windows is WinUSB. If you're using another driver in Zadig try switching to WinUSB.\n"
348+
"\n"
349+
"You can turn this message off by going to \"Config\" and then \"Advanced\".\n"
350+
"Under \"Troubleshooting\", uncheck \"Show a message when inputs are being read at a reduced rate\".");
350351

351352
}
352353
}
353354

354-
355-
356-
357355
void OnScreenUI::DrawChallengesAndLeaderboards()
358356
{
359357
if (!Config::Get(Config::MAIN_OSD_MESSAGES))

0 commit comments

Comments
 (0)