ui_qt, driver vtables: a menuless build, and the vtables nobody was checking

ui_qt_widgets.cpp puts the companion's one-line help on its rows with
wrapped_tooltip(), which is defined under HAVE_MENU, from a block that
is not. A build configured --disable-menu with Qt present does not
compile. The headless job configures exactly that and passes because
its runner has no Qt, so the two halves of the break never meet there.
The block is the menu's text, so it goes under the menu's guard.

The vtable check reads the driver structures that are filled in
positionally and compiles each against its interface. It matched names
of letters only, so audio_sdl3, microphone_sdl3, audio_ps3, audio_ps2,
audio_xenon360 and camera_v4l2 were walked past - six drivers, in the
check written because three drivers took a silent shift. Digits count
now, and the display drivers are read too: they fill in a vtable of the
same shape, eighteen of them, and a field was added to it this week.
This commit is contained in:
libretroadmin committed 2026-09-14 03:38:48 +02:00
1 parent c779b2f86b
commit 4967d2472b
2 files changed
+12 -2

No files matched your search

+7 -1
View File
@@ -55,6 +55,12 @@ jobs:
# Linux - the rest need SDKs that are not here - and treats a
# mismatched function pointer as the error it is.
#
# The names are matched with digits in them as well: a driver
# called sdl3 or v4l2 or ps2 is exactly as positional as one
# that spells itself in letters, and six of them were being
# walked past. The display drivers fill in a vtable of the
# same shape, so they are here too.
#
# A static function nobody calls is in the same family and is
# caught here too: it is what a call site that was meant to
# be there and is not looks like from the compiler's side.
@@ -74,7 +80,7 @@ jobs:
# an audio_driver_t and does not live under audio/drivers,
# and so was not in the list this job first carried.
files=$(grep -rl -E \
'audio_driver_t [a-z_]+ *=|camera_driver_t [a-z_]+ *=|record_driver_t [a-z_]+ *=|microphone_driver_t [a-z_]+ *=' \
'audio_driver_t [a-z_0-9]+ *=|camera_driver_t [a-z_0-9]+ *=|record_driver_t [a-z_0-9]+ *=|microphone_driver_t [a-z_0-9]+ *=|gfx_display_ctx_driver_t [a-z_0-9]+ *=' \
--include='*.c' . | grep -v '^\./samples/' | sort)
echo "$files" | sed 's/^/ /'
echo
+5 -1
View File
@@ -2661,7 +2661,10 @@ ViewOptionsWidget::ViewOptionsWidget(MainWindow *mainwindow, QWidget *parent) :
form->addRow(m_highlightColorLabel, m_highlightColorPushButton);
/* The same one-line help the Win32 and Cocoa companions show for
* these rows, on both the label and the control. */
* these rows, on both the label and the control. The text is the
* menu's, and so is wrapped_tooltip() - a build without the menu
* has neither. */
#ifdef HAVE_MENU
{
struct { QWidget *w; enum msg_hash_enums help; } tips[] = {
{ m_saveGeometryCheckBox, MENU_ENUM_SUBLABEL_QT_MENU_VIEW_OPTIONS_SAVE_GEOMETRY },
@@ -2683,6 +2686,7 @@ ViewOptionsWidget::ViewOptionsWidget(MainWindow *mainwindow, QWidget *parent) :
label->setToolTip(tip);
}
}
#endif
layout->addLayout(form);