mirror of
https://github.com/developersu/ns-usbloader.git
synced 2025-05-14 07:04:50 -04:00
v0.8 GoldLeaf v0.5 support. Optional. Updated since v0.5.2.
This commit is contained in:
parent
1d0a6086de
commit
bdb91b0e0a
13 changed files with 614 additions and 9 deletions
|
@ -164,7 +164,7 @@ public class NSLMainController implements Initializable {
|
|||
if (FrontTabController.getSelectedProtocol().equals("GoldLeaf") ||
|
||||
( FrontTabController.getSelectedProtocol().equals("TinFoil") && FrontTabController.getSelectedNetUsb().equals("USB") )
|
||||
){
|
||||
usbNetCommunications = new UsbCommunications(nspToUpload, FrontTabController.getSelectedProtocol(), SettingsTabController.getNSPFileFilterForGL());
|
||||
usbNetCommunications = new UsbCommunications(nspToUpload, FrontTabController.getSelectedProtocol()+SettingsTabController.getGlOldVer(), SettingsTabController.getNSPFileFilterForGL());
|
||||
workThread = new Thread(usbNetCommunications);
|
||||
workThread.setDaemon(true);
|
||||
workThread.start();
|
||||
|
@ -323,7 +323,8 @@ public class NSLMainController implements Initializable {
|
|||
SettingsTabController.getHostExtra(),
|
||||
SettingsTabController.getAutoCheckForUpdates(),
|
||||
SettingsTabController.getTfXCISupport(),
|
||||
SettingsTabController.getNSPFileFilterForGL()
|
||||
SettingsTabController.getNSPFileFilterForGL(),
|
||||
SettingsTabController.getGlOldVer()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,8 +61,16 @@ public class SettingsController implements Initializable {
|
|||
@FXML
|
||||
private ChoiceBox<String> langCB;
|
||||
|
||||
@FXML
|
||||
private CheckBox glOldVerCheck;
|
||||
|
||||
@FXML
|
||||
private ChoiceBox<String> glOldVerChoice;
|
||||
|
||||
private HostServices hs;
|
||||
|
||||
private static final String[] oldGlSupportedVersions = {"v0.5"};
|
||||
|
||||
@Override
|
||||
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||
nspFilesFilterForGLCB.setSelected(AppPreferences.getInstance().getNspFileFilterGL());
|
||||
|
@ -240,7 +248,20 @@ public class SettingsController implements Initializable {
|
|||
ResourceBundle.getBundle("locale", new Locale(langCB.getSelectionModel().getSelectedItem()))
|
||||
.getString("windowBodyRestartToApplyLang"));
|
||||
});
|
||||
|
||||
// Set supported old versions
|
||||
glOldVerChoice.getItems().addAll(oldGlSupportedVersions);
|
||||
String oldVer = AppPreferences.getInstance().getUseOldGlVersion(); // Overhead; Too much validation of consistency
|
||||
if (Arrays.asList(oldGlSupportedVersions).contains(oldVer)) {
|
||||
glOldVerChoice.getSelectionModel().select(oldVer);
|
||||
glOldVerChoice.setDisable(false);
|
||||
glOldVerCheck.setSelected(true);
|
||||
}
|
||||
else {
|
||||
glOldVerChoice.getSelectionModel().select(0);
|
||||
glOldVerChoice.setDisable(true);
|
||||
glOldVerCheck.setSelected(false);
|
||||
}
|
||||
glOldVerCheck.setOnAction(e-> glOldVerChoice.setDisable(! glOldVerCheck.isSelected()) );
|
||||
}
|
||||
public boolean getNSPFileFilterForGL(){return nspFilesFilterForGLCB.isSelected(); }
|
||||
public boolean getExpertModeSelected(){ return expertModeCb.isSelected(); }
|
||||
|
@ -262,4 +283,11 @@ public class SettingsController implements Initializable {
|
|||
newVersionLink.setVisible(true);
|
||||
newVersionLink.setText("https://github.com/developersu/ns-usbloader/releases/tag/"+newVer);
|
||||
}
|
||||
|
||||
public String getGlOldVer() {
|
||||
if (glOldVerCheck.isSelected())
|
||||
return glOldVerChoice.getValue();
|
||||
else
|
||||
return "";
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue