diff --git a/Launcher/runtime/dialog/dialog.js b/Launcher/runtime/dialog/dialog.js index 2ca9cf9d..7cab597e 100644 --- a/Launcher/runtime/dialog/dialog.js +++ b/Launcher/runtime/dialog/dialog.js @@ -198,6 +198,7 @@ function verifyLauncher(e) { } overlay.swap(0, processing.overlay, function(event) makeProfilesRequest(function(result) { settings.lastProfiles = result.profiles; + options.load(); // Update profiles list and hide overlay updateProfilesList(result.profiles); overlay.hide(0, function() { diff --git a/Launcher/runtime/dialog/overlay/options/options.js b/Launcher/runtime/dialog/overlay/options/options.js index 5ad2fc0e..b6642aba 100644 --- a/Launcher/runtime/dialog/overlay/options/options.js +++ b/Launcher/runtime/dialog/overlay/options/options.js @@ -2,7 +2,7 @@ var options = { file: DirBridge.dir.resolve("options.bin"), // options file /* options and overlay functions */ - load: function() { + load: function(profiles) { LogHelper.debug("Loading options file"); try { tryWithResources(new HInput(IOHelper.newInput(options.file)), options.read); @@ -27,10 +27,51 @@ var options = { if (magic != config.settingsMagic) { throw new java.io.IOException("options magic mismatch: " + java.lang.Integer.toString(magic, 16)); } + var profilesCount = input.readInt(); + LogHelper.debug("Load options. ProfilesCount %d",profilesCount); + for(var i = 0;i