added refresh rate to preferences

This commit is contained in:
Diego Waxemberg
2013-12-20 20:49:47 -05:00
parent 153d8b1db7
commit 627efa15f8
2 changed files with 10 additions and 5 deletions
+6 -2
View File
@@ -100,9 +100,13 @@ public class Limelight implements NvConnectionListener {
private StreamConfiguration createConfiguration(Resolution res) { private StreamConfiguration createConfiguration(Resolution res) {
switch(res) { switch(res) {
case RES_720: case RES_720_30:
return new StreamConfiguration(1280, 720, 30); return new StreamConfiguration(1280, 720, 30);
case RES_1080: case RES_720_60:
return new StreamConfiguration(1280, 720, 60);
case RES_1080_30:
return new StreamConfiguration(1920, 1080, 30);
case RES_1080_60:
return new StreamConfiguration(1920, 1080, 60); return new StreamConfiguration(1920, 1080, 60);
default: default:
// this should never happen, if it does we want the NPE to occur so we know something is wrong // this should never happen, if it does we want the NPE to occur so we know something is wrong
@@ -32,7 +32,8 @@ public abstract class PreferencesManager {
public static class Preferences implements Serializable { public static class Preferences implements Serializable {
private static final long serialVersionUID = -5575445156215348048L; private static final long serialVersionUID = -5575445156215348048L;
public enum Resolution { RES_720("1280x720 (720p)"), RES_1080("1920x1080 (1080p)"); public enum Resolution { RES_720_30("1280x720 (30Hz)"), RES_720_60("1280x720 (60Hz)"),
RES_1080_30("1920x1080 (30Hz)"), RES_1080_60("1920x1080 (60Hz)");
public String name; public String name;
private Resolution(String name) { private Resolution(String name) {
@@ -49,10 +50,10 @@ public abstract class PreferencesManager {
private boolean fullscreen; private boolean fullscreen;
/** /**
* construcs default preferences: 720p fullscreen * construcs default preferences: 720p 30Hz fullscreen
*/ */
public Preferences() { public Preferences() {
this.res = Resolution.RES_720; this.res = Resolution.RES_720_30;
this.fullscreen = true; this.fullscreen = true;
} }