Fix terrain streaming loop and auto-select single realm/character

Use getRemainingTileCount (pending + readyQueue) and processAllReadyTiles
to prevent loading screen from exiting before tiles are finalized. Auto-select
realm and character when only one is available.
This commit is contained in:
Kelsi 2026-02-06 14:56:26 -08:00
parent 81d712121e
commit aa11ffda72
5 changed files with 68 additions and 15 deletions

View file

@ -28,6 +28,16 @@ void RealmScreen::render(auth::AuthHandler& authHandler) {
if (realms.empty()) {
ImGui::Text("No realms available. Requesting realm list...");
authHandler.requestRealmList();
} else if (realms.size() == 1 && !realmSelected && !realms[0].lock) {
// Auto-select the only available realm
selectedRealmIndex = 0;
realmSelected = true;
selectedRealmName = realms[0].name;
selectedRealmAddress = realms[0].address;
setStatus("Auto-selecting realm: " + realms[0].name);
if (onRealmSelected) {
onRealmSelected(selectedRealmName, selectedRealmAddress);
}
} else {
// Realm table
if (ImGui::BeginTable("RealmsTable", 5, ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg)) {