//
// EditorPauseLayer::onSaveAndExit from 0x140182b30 to 0x140182b8d (93 bytes)
//
// 3 xrefs:
// > EditorPauseLayer::customSetup @ 0x1401816f9
// > ??> @ 0x140918c68
// > ??> @ 0x140918c74
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:27:37 +0000
//
void __fastcall EditorPauseLayer::onSaveAndExit(__int64 a1)
{
__int64 v2; // rcx
__int64 v3; // rax
if ( !*(_BYTE *)(a1 + 568) )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);
*(_BYTE *)(a1 + 568) = 1;
v3 = LocalLevelManager::sharedState(v2);
GManager::waitForSave(v3, 30.0);
if ( *(_QWORD *)(a1 + 576) )
LevelEditorLayer::saveLevel();
EditorPauseLayer::onExitEditor(a1);
}
}