1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2024-11-30 13:13:58 +01:00
Commit Graph

19 Commits

Author SHA1 Message Date
Seebs
2a50a19d73 Avoid pathological failure mode when trimming lines
If for any reason the document associated with a LimitLinesDocumentListener
ended up not getting shorter when its first line was removed (this is,
of course, impossible), sklauncher would wedge in a busy loop that
completely killed the GUI thread forever.

Solution, part #1: Don't do a while loop, just remove multiple lines
if you need to.

But wait, why are we having this problem at all? It turns out that there
are problems when the document's length changes, which can manifest as
tons of BadLocationExceptions going uncaught in the AWT thread which is
trying to refresh the window. Why? Probably because the insert into the
document isn't happening in the Swing run queue, but concurrently with
it. So use an invokeLater to do the actual insertion.

With these two changes, and a console set to 125 lines, I got no failures.
Previously, if I set the console to 125 lines, it would die catastrophically
before Minecraft was done starting up.

Also performance may be noticably better. It's pretty common for things
to dump 20+ lines into the buffer at once. If you have a 10,000 line buffer,
and you then delete the first line of it 20 times, that's actually a whole
lot of allocation and shuffling going on.
2015-07-30 19:00:08 -05:00
Slind14
be85ff175f un-editable icon 2015-03-21 14:32:09 +01:00
sk89q
0d8784992b Create instance directory more eagerly. 2015-02-23 00:07:46 -08:00
sk89q
b1c14da7e4 Try harder to create the initial instance folder on update. 2015-02-22 14:50:36 -08:00
sk89q
d6e7c02174 Remove "(not installed)" etc. which causes wrapping. 2015-02-20 13:23:11 -08:00
sk89q
c734ab751b Add a background to the fancy launcher. 2015-02-20 03:30:56 -08:00
sk89q
5270e81ac3 Show the main launcher view slightly quicker. 2015-02-20 01:40:57 -08:00
sk89q
ed4d6d2875 Make the split pane opaque on the launcher frame. 2015-02-20 01:39:34 -08:00
sk89q
b4926c0826 Make the background transparent on the news page view. 2015-02-20 01:38:42 -08:00
sk89q
f4f406d9cf Remove the header on the instance list. 2015-02-20 01:38:27 -08:00
sk89q
540a3bcaab Refactor startup and add new dark fancy theme. 2015-02-20 01:38:18 -08:00
sk89q
4b5bf7dca9 Fix memory leak with old launcher window. 2015-02-19 22:11:07 -08:00
sk89q
930456bb05 Remove extra fields on LauncherFrame. 2015-02-19 22:08:31 -08:00
sk89q
8cf14a5ce1 Split up LauncherFrame. 2015-02-19 21:34:57 -08:00
sk89q
515de39754 Remove unnecessary dependencies for the launcher. 2015-02-19 04:06:19 -08:00
sk89q
a67b8820e5 Switch to MigLayout for the main launcher frame. 2015-02-19 04:05:53 -08:00
sk89q
ab6ec9ed71 Add a fancy skinned version of the launcher. 2015-02-19 03:13:07 -08:00
sk89q
c41fb73bd1 Rename SharedLocale._() to tr(). 2015-02-18 21:32:26 -08:00
sk89q
5b6681b8ea Switch to Gradle. Use git log --follow for history.
This converts the project into a multi-module Gradle build.

By default, Git does not show history past a rename, so use git log
--follow to see further history.
2015-02-18 21:30:25 -08:00