浏览代码

minor fixes

ncannasse 8 年之前
父节点
当前提交
b0f45e7010
共有 3 个文件被更改,包括 21 次插入12 次删除
  1. 13 11
      hxd/Stage.hl.hx
  2. 6 1
      hxd/System.hl.hx
  3. 2 0
      hxd/snd/ALEmulator.hx

+ 13 - 11
hxd/Stage.hl.hx

@@ -79,13 +79,13 @@ class Stage {
 	}
 
 	public function resize( width : Int, height : Int ) : Void {
-		#if !psgl
+		#if (hldx || hlsdl)
 		window.resize(width, height);
 		#end
 	}
 
 	public function setFullScreen( v : Bool ) : Void {
-		#if !psgl
+		#if (hldx || hlsdl)
 		window.displayMode = v ? fullScreenMode : Windowed;
 		#end
 	}
@@ -115,15 +115,7 @@ class Stage {
 		return false;
 	}
 
-	#if psgl
-
-	function get_vsync() : Bool return true;
-
-	function set_vsync( b : Bool ) : Bool {
-		return true;
-	}
-
-	#else
+	#if (hldx||hlsdl)
 
 	function get_vsync() : Bool return window.vsync;
 
@@ -300,6 +292,16 @@ class Stage {
 		for( sdl in keys.keys() )
 			addKey(sdl, keys.get(sdl));
 	}
+
+
+	#else
+
+	function get_vsync() : Bool return true;
+
+	function set_vsync( b : Bool ) : Bool {
+		return true;
+	}
+
 	#end
 
 	static var inst : Stage = null;

+ 6 - 1
hxd/System.hl.hx

@@ -84,6 +84,9 @@ class System {
 			@:privateAccess Stage.inst = new Stage(title, width, height);
 			init();
 			dx.Loop.defaultEventHandler = @:privateAccess Stage.inst.onEvent;
+		#else
+			@:privateAccess Stage.inst = new Stage(title, width, height);
+			init();
 		#end
 
 		#end
@@ -91,7 +94,7 @@ class System {
 	}
 
 	public static function setNativeCursor( c : hxd.Cursor ) : Void {
-		#if !psgl
+		#if (hlsdl || hldx)
 		if( c.equals(currentNativeCursor) )
 			return;
 		currentNativeCursor = c;
@@ -143,6 +146,8 @@ class System {
 		return "PC/" + sdl.Sdl.getDevices()[0];
 		#elseif hldx
 		return "PC/" + dx.Driver.getDeviceName();
+		#else
+		return "PC/Commandline";
 		#end
 	}
 

+ 2 - 0
hxd/snd/ALEmulator.hx

@@ -298,6 +298,8 @@ class ALEmulator {
 			}
 		case GAIN:
 			source.volume = value;
+		case REFERENCE_DISTANCE, ROLLOFF_FACTOR, MAX_DISTANCE:
+			// nothing (spatialization)
 		default:
 			throw "Unsupported param 0x" + StringTools.hex(param);
 		}