瀏覽代碼

Merge branch 'master' into ArenaBug

alektron 7 月之前
父節點
當前提交
32d747cf8b
共有 3 個文件被更改,包括 9 次插入1 次删除
  1. 4 1
      src/main.cpp
  2. 1 0
      vendor/glfw/bindings/bindings.odin
  3. 4 0
      vendor/glfw/wrapper.odin

+ 4 - 1
src/main.cpp

@@ -1801,7 +1801,10 @@ gb_internal void check_defines(BuildContext *bc, Checker *c) {
 		if (!found) {
 			ERROR_BLOCK();
 			warning(nullptr, "given -define:%.*s is unused in the project", LIT(name));
-			error_line("\tSuggestion: use the -show-defineables flag for an overview of the possible defines\n");
+
+			if (!global_ignore_warnings()) {
+				error_line("\tSuggestion: use the -show-defineables flag for an overview of the possible defines\n");
+			}
 		}
 	}
 }

+ 1 - 0
vendor/glfw/bindings/bindings.odin

@@ -71,6 +71,7 @@ foreign glfw {
 	GetPrimaryMonitor      :: proc() -> MonitorHandle ---
 	GetMonitors            :: proc(count: ^c.int) -> [^]MonitorHandle ---
 	GetMonitorPos          :: proc(monitor: MonitorHandle, xpos, ypos: ^c.int) ---
+	GetMonitorWorkarea     :: proc(monitor: MonitorHandle, xpos, ypos, width, height: ^c.int) ---
 	GetMonitorPhysicalSize :: proc(monitor: MonitorHandle, widthMM, heightMM: ^c.int) ---
 	GetMonitorContentScale :: proc(monitor: MonitorHandle, xscale, yscale: ^f32) ---
 

+ 4 - 0
vendor/glfw/wrapper.odin

@@ -33,6 +33,10 @@ GetMonitorPos :: proc "c" (monitor: MonitorHandle) -> (xpos, ypos: c.int) {
 	glfw.GetMonitorPos(monitor, &xpos, &ypos)
 	return
 }
+GetMonitorWorkarea :: proc "c" (monitor: MonitorHandle) -> (xpos, ypos, width, height: c.int) {
+	glfw.GetMonitorWorkarea(monitor, &xpos, &ypos, &width, &height)
+	return
+}
 GetMonitorPhysicalSize :: proc "c" (monitor: MonitorHandle) -> (widthMM, heightMM: c.int) {
 	glfw.GetMonitorPhysicalSize(monitor, &widthMM, &heightMM)
 	return