allow building Qt with --disable-menu

This commit is contained in:
Brad Parker 2019-01-06 17:37:36 -05:00
parent 65c6caf5a6
commit 65c6bb69a4
3 changed files with 13 additions and 3 deletions

View File

@ -277,7 +277,7 @@ check_val '' SDL2 -lSDL2 SDL2
check_enabled QT 'Qt companion'
if [ "$HAVE_QT" != 'no' ] && [ "$MOC_PATH" != 'none' ] && [ "$HAVE_MENU" != 'no' ]; then
if [ "$HAVE_QT" != 'no' ] && [ "$MOC_PATH" != 'none' ]; then
check_pkgconf QT5CORE Qt5Core 5.2
check_pkgconf QT5GUI Qt5Gui 5.2
check_pkgconf QT5WIDGETS Qt5Widgets 5.2
@ -570,7 +570,6 @@ if [ "$HAVE_MATERIALUI" = no ] &&
[ "$HAVE_STRIPES" = no ] &&
[ "$HAVE_ZARCH" = no ]; then
HAVE_MENU=no
HAVE_QT=no
die : 'Notice: No menu drivers available, the Qt menu will also be disabled.'
# TODO: RetroArch will crash on start if only the Qt menu driver is enabled.
fi

View File

@ -769,15 +769,18 @@ void ShaderParamsDialog::saveShaderPreset(const char *path, unsigned action_type
strlcpy(file, path, sizeof(file));
break;
}
#ifdef HAVE_MENU
if (menu_shader_manager_save_preset(file, false, true))
runloop_msg_queue_push(
msg_hash_to_str(MSG_SHADER_PRESET_SAVED_SUCCESSFULLY),
1, 100, true);
else
#endif
{
runloop_msg_queue_push(
msg_hash_to_str(MSG_ERROR_SAVING_SHADER_PRESET),
1, 100, true);
}
}
void ShaderParamsDialog::onShaderSaveCorePresetClicked()

View File

@ -119,13 +119,17 @@ static void scan_finished_handler(void *task_data, void *user_data, const char *
{
bool dontAsk = false;
bool answer = false;
#ifdef HAVE_MENU
menu_ctx_environment_t menu_environ;
menu_environ.type = MENU_ENVIRON_RESET_HORIZONTAL_LIST;
menu_environ.data = NULL;
#endif
(void)task_data;
(void)user_data;
(void)err;
#ifdef HAVE_MENU
menu_driver_ctl(RARCH_MENU_CTL_ENVIRONMENT, &menu_environ);
#endif
@ -2507,7 +2511,9 @@ void MainWindow::onTimeout()
void MainWindow::onStopClicked()
{
#ifdef HAVE_MENU
menu_navigation_set_selection(0);
#endif
command_event(CMD_EVENT_UNLOAD_CORE, NULL);
setCurrentCoreLabel();
activateWindow();
@ -2594,7 +2600,9 @@ void MainWindow::onUnloadCoreMenuAction()
{
QAction *action = qobject_cast<QAction*>(sender());
#ifdef HAVE_MENU
menu_navigation_set_selection(0);
#endif
if (!command_event(CMD_EVENT_UNLOAD_CORE, NULL))
{