mirror of
https://github.com/developersu/ns-usbloader.git
synced 2025-06-03 08:38:53 -04:00
Solve - #87. Break LogPrinterGui
This commit is contained in:
parent
79c519b1f3
commit
1176ad9e83
32 changed files with 1348 additions and 738 deletions
|
@ -38,8 +38,8 @@ public class NxdtTask extends CancellableRunnable {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
logPrinter.print("Save to location: "+ saveToLocation, EMsgType.INFO);
|
||||
logPrinter.print("=============== nxdumptool ===============", EMsgType.INFO);
|
||||
print("Save to location: "+ saveToLocation, EMsgType.INFO);
|
||||
print("=============== nxdumptool ===============", EMsgType.INFO);
|
||||
|
||||
UsbConnect usbConnect = UsbConnect.connectHomebrewMode(logPrinter);
|
||||
|
||||
|
@ -54,13 +54,22 @@ public class NxdtTask extends CancellableRunnable {
|
|||
new NxdtUsbAbi1(handler, logPrinter, saveToLocation, this);
|
||||
}
|
||||
catch (Exception e){
|
||||
logPrinter.print(e.getMessage(), EMsgType.FAIL);
|
||||
print(e.getMessage(), EMsgType.FAIL);
|
||||
}
|
||||
|
||||
logPrinter.print(".:: Complete ::.", EMsgType.PASS);
|
||||
print(".:: Complete ::.", EMsgType.PASS);
|
||||
|
||||
usbConnect.close();
|
||||
logPrinter.updateOneLinerStatus(true);
|
||||
logPrinter.close();
|
||||
}
|
||||
|
||||
private void print(String message, EMsgType type){
|
||||
try {
|
||||
logPrinter.print(message, type);
|
||||
}
|
||||
catch (InterruptedException ie){
|
||||
ie.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -119,7 +119,7 @@ class NxdtUsbAbi1 {
|
|||
USBSTATUS_SUCCESS[9] = (byte)((endpointMaxPacketSize >> 8) & 0xFF);
|
||||
}
|
||||
|
||||
private void readLoop(){
|
||||
private void readLoop() throws InterruptedException{
|
||||
logPrinter.print("Awaiting for handshake", EMsgType.INFO);
|
||||
try {
|
||||
byte[] directive;
|
||||
|
@ -292,7 +292,7 @@ class NxdtUsbAbi1 {
|
|||
return nspFile != null;
|
||||
}
|
||||
|
||||
private String getAbsoluteFilePath(String filename) throws Exception{
|
||||
private String getAbsoluteFilePath(String filename) {
|
||||
if (isRomFs(filename) && isWindows) // Since RomFS entry starts from '/' it should be replaced to '\'.
|
||||
return saveToPath + filename.replaceAll("/", "\\\\");
|
||||
return saveToPath + filename;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue