mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 08:00:14 +00:00
Fix crash in character creation by deferring callback to next update
The charCreateCallback was firing synchronously during ImGui render, causing a state transition before the create screen's ImGui::End() was called. Defer the callback to GameHandler::update() and ensure update() runs during CHARACTER_CREATION and CHARACTER_SELECTION states.
This commit is contained in:
parent
26cd0bc57d
commit
2db690a866
3 changed files with 21 additions and 5 deletions
|
|
@ -344,11 +344,15 @@ void Application::update(float deltaTime) {
|
|||
break;
|
||||
|
||||
case AppState::CHARACTER_CREATION:
|
||||
// Character creation update
|
||||
if (gameHandler) {
|
||||
gameHandler->update(deltaTime);
|
||||
}
|
||||
break;
|
||||
|
||||
case AppState::CHARACTER_SELECTION:
|
||||
// Character selection update
|
||||
if (gameHandler) {
|
||||
gameHandler->update(deltaTime);
|
||||
}
|
||||
break;
|
||||
|
||||
case AppState::IN_GAME:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue