Skip to content

Commit 6b6bf83

Browse files
committed
Fix RCM for MacOS
1 parent aff6044 commit 6b6bf83

File tree

3 files changed

+3
-19
lines changed

3 files changed

+3
-19
lines changed

src/main/java/nsusbloader/Controllers/RcmController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public void initialize(URL url, ResourceBundle resourceBundle) {
9494
payloadFPathLbl5.setText(recentRcm5);
9595
}
9696

97-
injectPldBtn.setDisable(false); // TODO: write logic ?? Like in case PAYLOADER exist, button active. If not: not active?
97+
// TODO: write logic ?? Like in case PAYLOADER exist, button active. If not: not active?
9898
injectPldBtn.setOnAction(actionEvent -> smash());
9999
}
100100

src/main/java/nsusbloader/Utilities/RcmTask.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -269,23 +269,7 @@ private boolean writeUsb(byte[] message){
269269
* MacOS version of RcmSmash class
270270
* */
271271
boolean smashMacOS(){
272-
273-
// Release interface
274-
int result = LibUsb.releaseInterface(handler, 1);
275-
if (result != LibUsb.SUCCESS) {
276-
logPrinter.print("Release interface failed" +
277-
"\n Returned: " + result, EMsgType.FAIL);
278-
return true;
279-
}
280-
logPrinter.print("Release interface 1.", EMsgType.PASS);
281-
// Claim interface
282-
result = LibUsb.claimInterface(handler, 0);
283-
if (result != LibUsb.SUCCESS) {
284-
logPrinter.print("Claim interface 0." +
285-
"\n Returned: "+UsbErrorCodes.getErrCode(result), EMsgType.FAIL);
286-
return true;
287-
}
288-
logPrinter.print("Claim interface", EMsgType.PASS);
272+
int result;
289273

290274
ByteBuffer writeBuffer = ByteBuffer.allocateDirect(28672); //writeBuffer.order() equals BIG_ENDIAN; 28672
291275
result = LibUsb.controlTransfer(handler, (byte) 0x82, LibUsb.REQUEST_GET_STATUS, (short) 0, (short) 0, writeBuffer, 1000);

src/main/resources/RcmTab.fxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
<Pane VBox.vgrow="ALWAYS" />
206206
<HBox alignment="CENTER">
207207
<children>
208-
<Button fx:id="injectPldBtn" contentDisplay="TOP" disable="true" mnemonicParsing="false" styleClass="buttonUp" text="%btn_InjectPayloader">
208+
<Button fx:id="injectPldBtn" contentDisplay="TOP" mnemonicParsing="false" styleClass="buttonUp" text="%btn_InjectPayloader">
209209
<graphic>
210210
<SVGPath content="M 1 1 L 1 13.5 L 21 13.5 L 21 1 L 1 1 z M 26.226562 1.0683594 L 22 5.2949219 L 26.226562 9.5214844 L 27.226562 8.5214844 L 24.697266 6 L 31.158203 6 L 31.158203 20 L 32.566406 20 L 32.566406 4.5917969 L 24.697266 4.5917969 L 27.226562 2.0683594 L 26.226562 1.0683594 z M 2.515625 2.25 L 12.984375 2.25 C 12.993075 2.25 13 2.256995 13 2.265625 L 13 3.984375 C 12.999995 3.993026 12.993031 4 12.984375 4 L 2.515625 4 C 2.5069687 4 2.5 3.993031 2.5 3.984375 L 2.5 2.265625 C 2.5 2.256925 2.50697 2.25 2.515625 2.25 z M 2.515625 5.25 L 17.962891 5.25 C 17.971591 5.25 17.978516 5.256995 17.978516 5.265625 L 17.978516 6.984375 C 17.978516 6.993075 17.971521 7 17.962891 7 L 2.515625 7 C 2.5069687 6.99999 2.5 6.993031 2.5 6.984375 L 2.5 5.265625 C 2.5 5.256925 2.50697 5.25 2.515625 5.25 z M 2.515625 8.25 L 15.421875 8.25 C 15.430575 8.25 15.4375 8.256995 15.4375 8.265625 L 15.4375 9.984375 C 15.4375 9.993075 15.430505 10 15.421875 10 L 2.515625 10 C 2.5069687 9.99999 2.5 9.993031 2.5 9.984375 L 2.5 8.265625 C 2.5 8.256969 2.5069687 8.25 2.515625 8.25 z M 1 14.5 L 1 18 C 1 20 2 21 4 21 L 18 21 C 20 21 21 20 21 18 L 21 14.5 L 1 14.5 z M 5.8515625 16.001953 A 1.8950667 1.8950667 0 0 1 7.7480469 17.898438 A 1.8950667 1.8950667 0 0 1 5.8515625 19.792969 A 1.8950667 1.8950667 0 0 1 3.9570312 17.898438 A 1.8950667 1.8950667 0 0 1 5.8515625 16.001953 z" fill="#71e016" />
211211
</graphic></Button>

0 commit comments

Comments
 (0)