X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fkaka%2Fcakelight%2FConsole.java;h=84ca61e7ee4e0cf2923672c86a18cd27a46a398a;hb=8ff7ee5a10d5524162186006c9efb91935153f2f;hp=43ebd13e9516ec86960f24ecb76d8cbab566f328;hpb=8a0c98f8672e0b52a70f183c22421cf3d1033d9a;p=kaka%2Fcakelight.git diff --git a/src/kaka/cakelight/Console.java b/src/kaka/cakelight/Console.java index 43ebd13..84ca61e 100644 --- a/src/kaka/cakelight/Console.java +++ b/src/kaka/cakelight/Console.java @@ -47,11 +47,15 @@ public class Console extends Thread { ); cakelight.setMode(new SingleColorMode(c)); System.out.println("setting color to " + c); - } else if (input.matches("g|gamma\\s+[0-9.]+")) { + } else if (input.matches("(g|gamma)\\s+[0-9.]+")) { String[] split = input.split("\\s+"); config.gamma = Double.parseDouble(split[1]); + Color.calculateGammaCorrection(config.gamma); System.out.println("setting gamma to " + config.gamma); - break; + } else if (input.matches("(s|saturation)\\s+[0-9.]+")) { + String[] split = input.split("\\s+"); + config.video.saturation = Double.parseDouble(split[1]); + System.out.println("setting saturation to " + config.video.saturation); } } catch (IOException e) { System.out.println("Error reading from command line");