Skip to content

Commit

Permalink
KernelController now checks via sun.arch.data.model (the deciding fac…
Browse files Browse the repository at this point in the history
…tor irrelevant of the actual architecture of the system); OptionsUI default width now fits for default options
  • Loading branch information
LaurensWeyn committed Dec 15, 2017
1 parent 34b4522 commit 2a77b6e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions src/hooker/KernelController.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,17 @@ public static boolean is64Bit()
{
if(is64Bit == null)
{
//source: https://stackoverflow.com/questions/1856565/how-do-you-determine-32-or-64-bit-architecture-of-windows-using-java
if (System.getProperty("os.name").contains("Windows")) {
is64Bit = (System.getenv("ProgramFiles(x86)") != null);
} else {
//Linux not supported by KernelController so this is useless right now, but, future proofing I guess...
is64Bit = (System.getProperty("os.arch").contains("64"));
switch(System.getProperty("sun.arch.data.model"))
{
case "32":
is64Bit = false;
break;
case "64":
is64Bit = true;
break;
}
System.out.println("64 bit: " + is64Bit);
}
return is64Bit;

}
}
2 changes: 1 addition & 1 deletion src/options/OptionsUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ private void closeWindow()

public void initComponents()
{
setSize(720, 480);
setSize(760, 480);

setLayout(new BorderLayout(SPACING, SPACING));
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
Expand Down

0 comments on commit 2a77b6e

Please sign in to comment.