This commit is contained in:
Vaxry 2025-11-29 16:34:22 +00:00
parent 7ed53cced5
commit 1bfce2af12
Signed by: vaxry
GPG key ID: 665806380871D640
3 changed files with 5 additions and 5 deletions

View file

@ -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;
}

View file

@ -6,7 +6,7 @@
struct SGlobalState {
std::string headersAbiCompiled = "";
bool dontWarnInstall = false;
bool dontWarnInstall = false;
};
namespace DataState {

View file

@ -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);