mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Use separate version string for what's new, save it
Uses a separate version entry for the "what's new" version check to ensure that it properly resets whenever a "what's new" entry is ready to be displayed.
This commit is contained in:
parent
277e34fbb8
commit
a7ed93d88d
|
@ -2084,13 +2084,13 @@ void OBSBasic::OnFirstLoad()
|
|||
|
||||
#if defined(OBS_RELEASE_CANDIDATE) && OBS_RELEASE_CANDIDATE > 0
|
||||
#define CUR_VER OBS_RELEASE_CANDIDATE_VER
|
||||
#define LAST_INFO_VERSION_STRING "LastRCVersion"
|
||||
#define LAST_INFO_VERSION_STRING "InfoLastRCVersion"
|
||||
#elif OBS_BETA > 0
|
||||
#define CUR_VER OBS_BETA_VER
|
||||
#define LAST_INFO_VERSION_STRING "LastBetaVersion"
|
||||
#define LAST_INFO_VERSION_STRING "InfoLastBetaVersion"
|
||||
#else
|
||||
#define CUR_VER LIBOBS_API_VER
|
||||
#define LAST_INFO_VERSION_STRING "LastVersion"
|
||||
#define LAST_INFO_VERSION_STRING "InfoLastVersion"
|
||||
#endif
|
||||
|
||||
/* shows a "what's new" page on startup of new versions using CEF */
|
||||
|
@ -2150,6 +2150,8 @@ void OBSBasic::ReceivedIntroJson(const QString &text)
|
|||
if (lastVersion < CUR_VER) {
|
||||
config_set_int(App()->GlobalConfig(), "General",
|
||||
"InfoIncrement", -1);
|
||||
config_set_int(App()->GlobalConfig(), "General",
|
||||
LAST_INFO_VERSION_STRING, CUR_VER);
|
||||
} else {
|
||||
current_version_increment = config_get_int(
|
||||
App()->GlobalConfig(), "General", "InfoIncrement");
|
||||
|
@ -2161,6 +2163,7 @@ void OBSBasic::ReceivedIntroJson(const QString &text)
|
|||
|
||||
config_set_int(App()->GlobalConfig(), "General", "InfoIncrement",
|
||||
info_increment);
|
||||
config_save_safe(App()->GlobalConfig(), "tmp", nullptr);
|
||||
|
||||
/* Don't show What's New dialog for new users */
|
||||
#if !defined(OBS_RELEASE_CANDIDATE) || OBS_RELEASE_CANDIDATE == 0 || \
|
||||
|
|
Loading…
Reference in a new issue