Dolda2000 GitWeb
/
kaka
/
cakelight.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bugfix - reader was closed after reading
[kaka/cakelight.git]
/
src
/
kaka
/
cakelight
/
Console.java
diff --git
a/src/kaka/cakelight/Console.java
b/src/kaka/cakelight/Console.java
index
f32ba98
..
873dac1
100644
(file)
--- a/
src/kaka/cakelight/Console.java
+++ b/
src/kaka/cakelight/Console.java
@@
-32,6
+32,7
@@
public class Console extends Thread {
register(Commands.saturation());
register(Commands.ambientMode());
register(Commands.twoColorNoiseMode());
register(Commands.saturation());
register(Commands.ambientMode());
register(Commands.twoColorNoiseMode());
+ register(Commands.sunriseMode());
}
public CakeLight getCakelight() {
}
public CakeLight getCakelight() {
@@
-69,16
+70,15
@@
public class Console extends Thread {
@Override
public void run() {
@Override
public void run() {
-
while (true
) {
- System.out.print("> ");
- try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) {
+
try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))
) {
+ while (true) {
+ System.out.print("> ");
String input = reader.readLine();
handleInput(input);
String input = reader.readLine();
handleInput(input);
- } catch (IOException e) {
- System.out.println("Error reading from command line");
- break;
}
}
- }
+ } catch (IOException e) {
+ System.out.println("Error reading from command line");
+ }
}
void handleInput(String input) {
}
void handleInput(String input) {