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

View File

@@ -100,9 +100,13 @@ public class Limelight implements NvConnectionListener {
private StreamConfiguration createConfiguration(Resolution res) {
switch(res) {
case RES_720:
case RES_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);
default:
// this should never happen, if it does we want the NPE to occur so we know something is wrong

View File

@@ -32,7 +32,8 @@ public abstract class PreferencesManager {
public static class Preferences implements Serializable {
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;
private Resolution(String name) {
@@ -49,10 +50,10 @@ public abstract class PreferencesManager {
private boolean fullscreen;
/**
* construcs default preferences: 720p fullscreen
* construcs default preferences: 720p 30Hz fullscreen
*/
public Preferences() {
this.res = Resolution.RES_720;
this.res = Resolution.RES_720_30;
this.fullscreen = true;
}