From 9fb54a0a1c65d25297955652f8efc85835a95ac4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 20 Jul 2020 01:58:49 +0200 Subject: [PATCH] Fix --disable-menu --- config.def.h | 2 +- configuration.c | 2 +- gfx/drivers/gdi_gfx.c | 1 + gfx/gfx_widgets.h | 9 +++++++++ menu/menu_defines.h | 9 --------- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/config.def.h b/config.def.h index 3c8bc83712..49c6a1a07d 100644 --- a/config.def.h +++ b/config.def.h @@ -771,7 +771,7 @@ static const bool audio_enable_menu_bgm = false; #define DEFAULT_NOTIFICATION_SHOW_SCREENSHOT true /*Desired duration of the screenshot notification*/ -static const unsigned notification_show_screenshot_duration = NOTIFICATION_SHOW_SCREENSHOT_DURATION_NORMAL; +#define DEFAULT_NOTIFICATION_SHOW_SCREENSHOT_DURATION 0 /* Display a white flashing effect when * taking a screenshot*/ diff --git a/configuration.c b/configuration.c index 97957e2592..f941096956 100644 --- a/configuration.c +++ b/configuration.c @@ -1922,7 +1922,7 @@ static struct config_uint_setting *populate_settings_uint( SETTING_UINT("screen_orientation", &settings->uints.screen_orientation, true, ORIENTATION_NORMAL, false); SETTING_UINT("aspect_ratio_index", &settings->uints.video_aspect_ratio_idx, true, DEFAULT_ASPECT_RATIO_IDX, false); #ifdef HAVE_SCREENSHOTS - SETTING_UINT("notification_show_screenshot_duration", &settings->uints.notification_show_screenshot_duration, true, notification_show_screenshot_duration, false); + SETTING_UINT("notification_show_screenshot_duration", &settings->uints.notification_show_screenshot_duration, true, DEFAULT_NOTIFICATION_SHOW_SCREENSHOT_DURATION, false); #endif #ifdef HAVE_NETWORKING SETTING_UINT("netplay_ip_port", &settings->uints.netplay_port, true, RARCH_DEFAULT_PORT, false); diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index d7d5e13afb..524e970612 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -17,6 +17,7 @@ #include #include +#include #ifdef HAVE_CONFIG_H #include "../../config.h" diff --git a/gfx/gfx_widgets.h b/gfx/gfx_widgets.h index c8bd09e577..d222e59706 100644 --- a/gfx/gfx_widgets.h +++ b/gfx/gfx_widgets.h @@ -68,6 +68,15 @@ enum gfx_widgets_icon MENU_WIDGETS_ICON_LAST }; +enum notification_show_screenshot_duration +{ + NOTIFICATION_SHOW_SCREENSHOT_DURATION_NORMAL = 0, + NOTIFICATION_SHOW_SCREENSHOT_DURATION_FAST, + NOTIFICATION_SHOW_SCREENSHOT_DURATION_VERY_FAST, + NOTIFICATION_SHOW_SCREENSHOT_DURATION_INSTANT, + NOTIFICATION_SHOW_SCREENSHOT_DURATION_LAST +}; + /* This structure holds all objects + metadata * corresponding to a particular font */ typedef struct diff --git a/menu/menu_defines.h b/menu/menu_defines.h index e944c551b3..c92eddd7d4 100644 --- a/menu/menu_defines.h +++ b/menu/menu_defines.h @@ -122,15 +122,6 @@ enum menu_timedate_date_separator_type MENU_TIMEDATE_DATE_SEPARATOR_LAST }; -enum notification_show_screenshot_duration -{ - NOTIFICATION_SHOW_SCREENSHOT_DURATION_NORMAL = 0, - NOTIFICATION_SHOW_SCREENSHOT_DURATION_FAST, - NOTIFICATION_SHOW_SCREENSHOT_DURATION_VERY_FAST, - NOTIFICATION_SHOW_SCREENSHOT_DURATION_INSTANT, - NOTIFICATION_SHOW_SCREENSHOT_DURATION_LAST -}; - enum rgui_color_theme { RGUI_THEME_CUSTOM = 0,