浏览代码

fix clipboard support (requires -D hl_ver=1.12.0) close #989

Nicolas Cannasse 4 年之前
父节点
当前提交
f02735abb3
共有 1 个文件被更改,包括 11 次插入3 次删除
  1. 11 3
      hxd/System.hl.hx

+ 11 - 3
hxd/System.hl.hx

@@ -284,11 +284,19 @@ class System {
 	}
 	#end
 
-	#if hlsdl
+	#if (hl_ver < version("1.12.0"))
+	public static function getClipboardText() : String {
+		return null;
+	}
+
+	public static function setClipboardText(text:String) : Bool {
+		return false;
+	}
+	#elseif hlsdl
 	public static function getClipboardText() : String {
 		return sdl.Sdl.getClipboardText();
 	}
-	
+
 	public static function setClipboardText(text:String) : Bool {
 		return sdl.Sdl.setClipboardText(text);
 	}
@@ -296,7 +304,7 @@ class System {
 	public static function getClipboardText() : String {
 		return hl.UI.getClipboardText();
 	}
-	
+
 	public static function setClipboardText(text:String) : Bool {
 		return hl.UI.setClipboardText(text);
 	}