| 98 | // Step-by-step init for debugging (call with step 1,2,3,4 in order) |
| 99 | static int g_initStep = 0; |
| 100 | PF_API int pf_init_step(int step) { |
| 101 | if (step == 1) { Poseidon::Foundation::CurrentAppFrameFunctions = &g_appFrame; g_initStep = 1; return 1; } |
| 102 | if (step == 2) { SetMemorySystemReady(true); g_initStep = 2; return 1; } |
| 103 | if (step == 3) { InitLibraryElement(); g_initStep = 3; return 1; } |
| 104 | if (step == 4) |
| 105 | { |
| 106 | Poseidon::GEngine = Poseidon::CreateEngineDummy(); |
| 107 | g_initStep = 4; |
| 108 | g_initialized = true; |
| 109 | ClearError(); |
| 110 | return 1; |
| 111 | } |
| 112 | return 0; |
| 113 | } |
| 114 | |
| 115 | PF_API int pf_init(void) { |
| 116 | std::lock_guard<std::mutex> lock(g_initMutex); |
nothing calls this directly
no test coverage detected