X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosuilib%2FAltosDisplayThread.java;h=fac4ad722b079c0c96f42978f7c3e57e4bc60813;hb=a81d028dc62a0a624051fc3c9debb9687fda931e;hp=a773022bac1f0d39994b91f0c4de278e47453691;hpb=0afa07d3c1dcb5e301fcb8b4edfecdd961662478;p=fw%2Faltos diff --git a/altosuilib/AltosDisplayThread.java b/altosuilib/AltosDisplayThread.java index a773022b..fac4ad72 100644 --- a/altosuilib/AltosDisplayThread.java +++ b/altosuilib/AltosDisplayThread.java @@ -219,12 +219,14 @@ public class AltosDisplayThread extends Thread { try { for (;;) { try { - state = reader.read(); - if (state == null) { + AltosState new_state = reader.read(); + if (new_state == null) { + state = null; listener_state.running = false; break; } - reader.update(state); + reader.update(new_state); + state = new_state; show_safely(); told = tell(); idle_thread.notice(told);