Skip to content

Commit b7e3b1d

Browse files
committed
scev: Fix librvvm API usage
1 parent 9d96ae6 commit b7e3b1d

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/main/java/lekkit/scev/gui/MachineGui.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void drawScreen(int mouse_x, int mouse_y, float par3) {
3131
if (texID == 0) {
3232
RVVMNative.loadLib("/usr/lib/librvvm.so");
3333

34-
machine = new RVVMMachine(256, 1, true);
34+
machine = new RVVMMachine(256, 1, "rv64");
3535
new PLIC(machine);
3636
new PCIBus(machine);
3737
new I2CBus(machine);

src/main/java/lekkit/scev/inventory/InventoryLaptop.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected MachineState buildMachine(UUID uuid) {
6060
return null;
6161
}
6262

63-
MachineState state = MachineManager.createMachineState(uuid, mem_mb, 1, true);
63+
MachineState state = MachineManager.createMachineState(uuid, mem_mb, 1, "rv64");
6464
if (state == null) {
6565
return null;
6666
}

src/main/java/lekkit/scev/server/MachineManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
public class MachineManager {
77
private static HashMap<UUID, MachineState> machines = new HashMap<UUID, MachineState>();
88

9-
public synchronized static MachineState createMachineState(UUID machineUUID, long mem_mb, int smp, boolean rv64) {
9+
public synchronized static MachineState createMachineState(UUID machineUUID, long mem_mb, int smp, String isa) {
1010
MachineState state = getMachineState(machineUUID);
1111
if (state != null) {
1212
System.out.println("Machine already exists!");
1313
return null;
1414
}
1515

1616
state = new MachineState(machineUUID);
17-
if (state.create(mem_mb, smp, rv64)) {
17+
if (state.create(mem_mb, smp, isa)) {
1818
machines.put(machineUUID, state);
1919

2020
return state;

src/main/java/lekkit/scev/server/MachineState.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public MachineState(UUID machineUUID) {
2727
uuid = machineUUID;
2828
}
2929

30-
public boolean create(long mem_mb, int smp, boolean rv64) {
30+
public boolean create(long mem_mb, int smp, String isa) {
3131
RVVMNative.loadLib("/usr/lib/librvvm.so");
3232

33-
machine = new RVVMMachine(mem_mb, smp, rv64);
33+
machine = new RVVMMachine(mem_mb, smp, isa);
3434
if (machine.isValid()) {
3535
machine.setOption(RVVMMachine.RVVM_OPT_HW_IMITATE, 1);
3636

src/main/java/lekkit/scev/tileentity/TileEntityComputerCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected MachineState buildMachine(UUID uuid) {
5555
return null;
5656
}
5757

58-
MachineState state = MachineManager.createMachineState(uuid, mem_mb, 1, true);
58+
MachineState state = MachineManager.createMachineState(uuid, mem_mb, 1, "rv64");
5959
if (state == null) {
6060
return null;
6161
}

0 commit comments

Comments
 (0)