Add option to turn on Experimental Network Compatibility

the user can try to turn on this option to test compatibility, defaults to OFF
This commit is contained in:
Anthony Calosa
2020-04-05 07:14:03 +08:00
parent c714187eee
commit 52307c02d0
8 changed files with 16 additions and 16 deletions

View File

@@ -225,7 +225,7 @@ public class Main extends AndroidApplication {
}
ForgePreferences prefs = FModel.getPreferences();
boolean propertyConfig = prefs != null && prefs.getPrefBoolean(ForgePreferences.FPref.UI_USE_ELSA);
boolean propertyConfig = prefs != null && prefs.getPrefBoolean(ForgePreferences.FPref.UI_NETPLAY_COMPAT);
initialize(Forge.getApp(new AndroidClipboard(), adapter, assetsDir, propertyConfig));
}

View File

@@ -220,8 +220,8 @@ public enum FControl implements KeyEventDispatcher {
final ForgePreferences prefs = FModel.getPreferences();
//set ElsaSerializer from preference
boolean propertyConfig = prefs != null && prefs.getPrefBoolean(ForgePreferences.FPref.UI_USE_ELSA);
//set ExperimentalNetworkOption from preference
boolean propertyConfig = prefs != null && prefs.getPrefBoolean(ForgePreferences.FPref.UI_NETPLAY_COMPAT);
GuiBase.enablePropertyConfig(propertyConfig);
closeAction = CloseAction.valueOf(prefs.getPref(FPref.UI_CLOSE_ACTION));

View File

@@ -115,7 +115,7 @@ public enum CSubmenuPreferences implements ICDoc {
lstControls.add(Pair.of(view.getCbSingletons(), FPref.DECKGEN_SINGLETONS));
lstControls.add(Pair.of(view.getCbEnableAICheats(), FPref.UI_ENABLE_AI_CHEATS));
lstControls.add(Pair.of(view.getCbEnableUnknownCards(), FPref.UI_LOAD_UNKNOWN_CARDS));
lstControls.add(Pair.of(view.getCbUseElsa(), FPref.UI_USE_ELSA));
lstControls.add(Pair.of(view.getCbUseExperimentalNetworkStream(), FPref.UI_NETPLAY_COMPAT));
lstControls.add(Pair.of(view.getCbImageFetcher(), FPref.UI_ENABLE_ONLINE_IMAGE_FETCHER));
lstControls.add(Pair.of(view.getCbDisplayFoil(), FPref.UI_OVERLAY_FOIL_EFFECT));
lstControls.add(Pair.of(view.getCbRandomFoil(), FPref.UI_RANDOM_FOIL));

View File

@@ -108,7 +108,7 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
private final JCheckBox cbRemindOnPriority = new OptionsCheckBox(localizer.getMessage("cbRemindOnPriority"));
private final JCheckBox cbUseSentry = new OptionsCheckBox(localizer.getMessage("cbUseSentry"));
private final JCheckBox cbEnableUnknownCards = new OptionsCheckBox("Enable Unknown Cards");
private final JCheckBox cbUseElsa = new OptionsCheckBox("Use ELSA Serializer");
private final JCheckBox cbUseExperimentalNetworkStream = new OptionsCheckBox("Experimental Network Compatibility");
private final Map<FPref, KeyboardShortcutField> shortcutFields = new HashMap<>();
@@ -292,8 +292,8 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
pnlPrefs.add(cbEnableUnknownCards, titleConstraints);
pnlPrefs.add(new NoteLabel("Enable Unknown Cards to be loaded to Unknown Set. (Requires restart)"), descriptionConstraints);
/*pnlPrefs.add(cbUseElsa, titleConstraints);
pnlPrefs.add(new NoteLabel("Use ELSA Serializer for Network (EXPERIMENTAL Option, Requires restart)"), descriptionConstraints);*/
pnlPrefs.add(cbUseExperimentalNetworkStream, titleConstraints);
pnlPrefs.add(new NoteLabel("Forge switches to compatible network stream. (If unsure, turn OFF this option)"), descriptionConstraints);
// Graphic Options
pnlPrefs.add(new SectionLabel(localizer.getMessage("GraphicOptions")), sectionConstraints + ", gaptop 2%");
@@ -594,8 +594,8 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
}
/** @return {@link javax.swing.JCheckBox} */
public JCheckBox getCbUseElsa() {
return cbUseElsa;
public JCheckBox getCbUseExperimentalNetworkStream() {
return cbUseExperimentalNetworkStream;
}
/** @return {@link javax.swing.JCheckBox} */

View File

@@ -32,7 +32,7 @@ public class Main extends IOSApplication.Delegate {
config.useAccelerometer = false;
config.useCompass = false;
ForgePreferences prefs = FModel.getPreferences();
boolean propertyConfig = prefs != null && prefs.getPrefBoolean(ForgePreferences.FPref.UI_USE_ELSA);
boolean propertyConfig = prefs != null && prefs.getPrefBoolean(ForgePreferences.FPref.UI_NETPLAY_COMPAT);
final ApplicationListener app = Forge.getApp(new IOSClipboard(), new IOSAdapter(), assetsDir, propertyConfig);
final IOSApplication iosApp = new IOSApplication(app, config);
return iosApp;

View File

@@ -95,7 +95,7 @@ public class Main {
config.useHDPI = desktopMode; // enable HiDPI on Mac OS
ForgePreferences prefs = FModel.getPreferences();
boolean propertyConfig = prefs != null && prefs.getPrefBoolean(ForgePreferences.FPref.UI_USE_ELSA);
boolean propertyConfig = prefs != null && prefs.getPrefBoolean(ForgePreferences.FPref.UI_NETPLAY_COMPAT);
new LwjglApplication(Forge.getApp(new LwjglClipboard(), new DesktopAdapter(switchOrientationFile),
desktopMode ? desktopModeAssetsDir : assetsDir, propertyConfig), config);
}

View File

@@ -236,10 +236,10 @@ public class SettingsPage extends TabPage<SettingsScreen> {
"Enable Unknown Cards",
"Enable Unknown Cards to be loaded to Unknown Set. (Requires restart)"),
3);
/*lstSettings.addItem(new BooleanSetting(FPref.UI_USE_ELSA,
"Use ELSA Serializer",
"Use ELSA Serializer for Network (EXPERIMENTAL Option, Requires restart)"),
3);*/
lstSettings.addItem(new BooleanSetting(FPref.UI_NETPLAY_COMPAT,
"Experimental Network Compatibility",
"Forge switches to compatible network stream. (If unsure, turn OFF this option)"),
3);
//Graphic Options
lstSettings.addItem(new BooleanSetting(FPref.UI_ENABLE_ONLINE_IMAGE_FETCHER,

View File

@@ -139,7 +139,7 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
UI_ENABLE_PRELOAD_EXTENDED_ART("false"),
UI_ENABLE_BORDER_MASKING("false"),
UI_SHOW_FPS("false"),
UI_USE_ELSA("false"),
UI_NETPLAY_COMPAT("false"),
UI_LOAD_UNKNOWN_CARDS("true"),
UI_ALLOW_ORDER_GRAVEYARD_WHEN_NEEDED ("Never"),
UI_DEFAULT_FONT_SIZE("12"),