Buildfix --disable-menu - bake out shader params for desktop menu if

HAVE_MENU is not set
This commit is contained in:
twinaphex 2020-10-01 13:04:13 +02:00
parent 9be7da9665
commit dd6924a940
4 changed files with 22 additions and 6 deletions

View File

@ -461,10 +461,10 @@ ifeq ($(HAVE_QT), 1)
ui/drivers/qt/thumbnaildownload.o \
ui/drivers/qt/thumbnailpackdownload.o \
ui/drivers/qt/playlistthumbnaildownload.o
ifeq ($(HAVE_SHADERS_COMMON), 1)
OBJ += ui/drivers/qt/shaderparamsdialog.o
endif
ifeq ($(HAVE_MENU), 1)
ifeq ($(HAVE_SHADERS_COMMON), 1)
OBJ += ui/drivers/qt/shaderparamsdialog.o
endif
OBJ += ui/drivers/qt/settingswidgets.o \
ui/drivers/qt/options/achievements.o \
ui/drivers/qt/options/audio.o \
@ -489,10 +489,10 @@ ifeq ($(HAVE_QT), 1)
ui/drivers/qt/coreinfodialog.h \
ui/drivers/qt/playlistentrydialog.h \
ui/drivers/qt/viewoptionsdialog.h
ifeq ($(HAVE_SHADERS_COMMON), 1)
MOC_HEADERS += ui/drivers/qt/shaderparamsdialog.h
endif
ifeq ($(HAVE_MENU), 1)
ifeq ($(HAVE_SHADERS_COMMON), 1)
MOC_HEADERS += ui/drivers/qt/shaderparamsdialog.h
endif
MOC_HEADERS += ui/drivers/qt/settingswidgets.h \
ui/drivers/qt/options/options.h
endif

View File

@ -323,7 +323,9 @@ MainWindow::MainWindow(QWidget *parent) :
,m_playlistEntryDialog(NULL)
,m_statusMessageElapsedTimer()
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
#ifdef HAVE_MENU
,m_shaderParamsDialog(new ShaderParamsDialog())
#endif
#endif
,m_coreOptionsDialog(new CoreOptionsDialog())
,m_networkManager(new QNetworkAccessManager(this))
@ -683,7 +685,9 @@ MainWindow::MainWindow(QWidget *parent) :
connect(this, SIGNAL(gotStatusMessage(QString,unsigned,unsigned,bool)), this, SLOT(onGotStatusMessage(QString,unsigned,unsigned,bool)), Qt::AutoConnection);
connect(this, SIGNAL(gotReloadPlaylists()), this, SLOT(onGotReloadPlaylists()), Qt::AutoConnection);
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
#ifdef HAVE_MENU
connect(this, SIGNAL(gotReloadShaderParams()), this, SLOT(onGotReloadShaderParams()), Qt::AutoConnection);
#endif
#endif
connect(this, SIGNAL(gotReloadCoreOptions()), this, SLOT(onGotReloadCoreOptions()), Qt::AutoConnection);
@ -1128,6 +1132,7 @@ void MainWindow::onGotStatusMessage(
}
}
#ifdef HAVE_MENU
void MainWindow::deferReloadShaderParams()
{
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
@ -1154,6 +1159,7 @@ void MainWindow::onGotReloadShaderParams()
m_shaderParamsDialog->reload();
#endif
}
#endif
void MainWindow::onCoreOptionsClicked()
{

View File

@ -693,9 +693,11 @@ static void ui_companion_qt_event_command(void *data, enum event_command cmd)
{
case CMD_EVENT_SHADERS_APPLY_CHANGES:
case CMD_EVENT_SHADER_PRESET_LOADED:
#ifdef HAVE_MENU
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
RARCH_LOG("[Qt]: Reloading shader parameters.\n");
win_handle->qtWindow->deferReloadShaderParams();
#endif
#endif
break;
default:
@ -708,10 +710,12 @@ static void ui_companion_qt_notify_list_pushed(void *data, file_list_t *list,
static void ui_companion_qt_notify_refresh(void *data)
{
#ifdef HAVE_MENU
ui_companion_qt_t *handle = (ui_companion_qt_t*)data;
ui_window_qt_t *win_handle = (ui_window_qt_t*)handle->window;
win_handle->qtWindow->deferReloadPlaylists();
#endif
}
static void ui_companion_qt_log_msg(void *data, const char *msg)

View File

@ -449,7 +449,9 @@ public slots:
void reloadPlaylists();
void deferReloadPlaylists();
void onGotReloadPlaylists();
#ifdef HAVE_MENU
void onGotReloadShaderParams();
#endif
void onGotReloadCoreOptions();
void showWelcomeScreen();
void onIconViewClicked();
@ -465,7 +467,9 @@ public slots:
void updateRetroArchNightly();
void onUpdateRetroArchFinished(bool success);
void onThumbnailPackExtractFinished(bool success);
#ifdef HAVE_MENU
void deferReloadShaderParams();
#endif
void downloadThumbnail(QString system, QString title, QUrl url = QUrl());
void downloadAllThumbnails(QString system, QUrl url = QUrl());
void downloadPlaylistThumbnails(QString playlistPath);
@ -497,7 +501,9 @@ private slots:
void onStopClicked();
void onZoomValueChanged(int value);
void onPlaylistFilesDropped(QStringList files);
#ifdef HAVE_MENU
void onShaderParamsClicked();
#endif
void onCoreOptionsClicked();
void onShowErrorMessage(QString msg);
void onShowInfoMessage(QString msg);