Add text to warning dialog when overwriting a non-extended version save

This commit is contained in:
Jonathan G Rennison
2023-05-14 12:47:17 +01:00
parent b26d91770f
commit 4ed0c23644
6 changed files with 44 additions and 1 deletions

View File

@@ -809,3 +809,22 @@ void GamelogInfo(LoggedAction *gamelog_action, uint gamelog_actions, uint32 *las
}
}
}
const char *GamelogGetLastRevision(const LoggedAction *gamelog_action, uint gamelog_actions)
{
for (uint i = gamelog_actions; i > 0; i--) {
const LoggedAction &la = gamelog_action[i - 1];
const LoggedChange *lcend = &(la.change[la.changes]);
for (const LoggedChange *lc = la.change; lc != lcend; lc++) {
switch (lc->ct) {
case GLCT_REVISION:
return lc->revision.text;
break;
default:
break;
}
}
}
return nullptr;
}