Skip to content

Commit

Permalink
1.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
syd711 committed Nov 10, 2022
1 parent 7568539 commit 34cd6b4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/java/de/mephisto/vpin/extensions/OverlayWindowFX.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class OverlayWindowFX extends Application implements NativeKeyListener, P

private boolean visible = false;

private boolean initialLaunchExecuted = false;

public static OverlayWindowFX INSTANCE;

private Stage stage;
Expand Down Expand Up @@ -107,6 +109,8 @@ public void nativeKeyPressed(NativeKeyEvent nativeKeyEvent) {

KeyChecker killKeyChecker = new KeyChecker(killKey);
if(killKeyChecker.matches(nativeKeyEvent)) {
String keyText = NativeKeyEvent.getKeyText(nativeKeyEvent.getKeyCode());
LOG.info("Kill switch key event '" + keyText + "' (" + nativeKeyEvent.getKeyCode() + ")");
restartPopper();
}
}
Expand Down Expand Up @@ -134,12 +138,12 @@ public void nativeKeyReleased(NativeKeyEvent nativeKeyEvent) {

}



@Override
public void popperLaunched() {
LOG.info("Received Popper Launch Event");
boolean launch = Config.getOverlayGeneratorConfig().getBoolean("overlay.launchOnStartup");
if (launch) {
if (launch && !initialLaunchExecuted) {
initialLaunchExecuted = true;
int delay = Config.getOverlayGeneratorConfig().getInt("overlay.launchDelay", 0);
if (delay > 0) {
try {
Expand Down

0 comments on commit 34cd6b4

Please sign in to comment.