mirror of
https://github.com/hyprwm/Hyprland
synced 2026-05-05 08:38:07 +02:00
e
This commit is contained in:
parent
7ed53cced5
commit
1bfce2af12
3 changed files with 5 additions and 5 deletions
|
|
@ -206,8 +206,8 @@ SGlobalState DataState::getGlobalState() {
|
|||
auto DATA = toml::parse_file(stateFile.c_str());
|
||||
|
||||
SGlobalState state;
|
||||
state.headersHashCompiled = DATA["state"]["hash"].value_or("");
|
||||
state.dontWarnInstall = DATA["state"]["dont_warn_install"].value_or(false);
|
||||
state.headersAbiCompiled = DATA["state"]["hash"].value_or("");
|
||||
state.dontWarnInstall = DATA["state"]["dont_warn_install"].value_or(false);
|
||||
|
||||
return state;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
struct SGlobalState {
|
||||
std::string headersAbiCompiled = "";
|
||||
bool dontWarnInstall = false;
|
||||
bool dontWarnInstall = false;
|
||||
};
|
||||
|
||||
namespace DataState {
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ int main(int argc, char** argv, char** envp) {
|
|||
const auto HLVER = g_pPluginManager->getHyprlandVersion();
|
||||
auto GLOBALSTATE = DataState::getGlobalState();
|
||||
|
||||
if (GLOBALSTATE.headersHashCompiled != HLVER.hash) {
|
||||
if (GLOBALSTATE.headersAbiCompiled != HLVER.abiHash) {
|
||||
std::println(stderr, "{}", failureString("Headers outdated, please run hyprpm update."));
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -137,7 +137,7 @@ int main(int argc, char** argv, char** envp) {
|
|||
if (headers) {
|
||||
const auto HLVER = g_pPluginManager->getHyprlandVersion(false);
|
||||
auto GLOBALSTATE = DataState::getGlobalState();
|
||||
const auto COMPILEDOUTDATED = HLVER.hash != GLOBALSTATE.headersHashCompiled;
|
||||
const auto COMPILEDOUTDATED = HLVER.abiHash != GLOBALSTATE.headersAbiCompiled;
|
||||
|
||||
bool ret1 = g_pPluginManager->updatePlugins(!headersValid || force || COMPILEDOUTDATED);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue