Actually fix the applet launch - it now launches properly *and* closes the window

This commit is contained in:
Christian committed 2012-08-13 22:12:36 -04:00
1 parent 17bf8dc363
commit 416cac675b
1 file changed
+14
@@ -65,6 +65,10 @@ public class FMLRelauncher
}
private void showWindow(boolean showIt)
{
if (RelaunchLibraryManager.downloadMonitor!=null)
{
return;
}
try
{
RelaunchLibraryManager.downloadMonitor = new Downloader();
@@ -196,6 +200,11 @@ public class FMLRelauncher
appletClass = ReflectionHelper.getClass(classLoader, "net.minecraft.client.MinecraftApplet");
if (minecraftApplet.getClass().getClassLoader() == classLoader)
{
if (popupWindow!=null)
{
popupWindow.setVisible(false);
popupWindow.dispose();
}
try
{
newApplet = minecraftApplet;
@@ -254,6 +263,11 @@ public class FMLRelauncher
{
if (applet.getClass().getClassLoader() == classLoader)
{
if (popupWindow!=null)
{
popupWindow.setVisible(false);
popupWindow.dispose();
}
try
{
ReflectionHelper.findMethod(appletClass, newApplet, new String[] {"fmlStartReentry"}).invoke(newApplet);