From 3b2864d8a60623a7fc534508474fd6a2ce734d0b Mon Sep 17 00:00:00 2001 From: Matias Fernandez Date: Sat, 22 Apr 2023 17:49:16 -0400 Subject: [PATCH 1/4] Add IsWindow to user32.odin This is useful for checking if window has been closed without going through the WindowProc. --- core/sys/windows/user32.odin | 1 + 1 file changed, 1 insertion(+) diff --git a/core/sys/windows/user32.odin b/core/sys/windows/user32.odin index 05d6837dd..e8499a67b 100644 --- a/core/sys/windows/user32.odin +++ b/core/sys/windows/user32.odin @@ -38,6 +38,7 @@ foreign user32 { DestroyWindow :: proc(hWnd: HWND) -> BOOL --- ShowWindow :: proc(hWnd: HWND, nCmdShow: c_int) -> BOOL --- + IsWindow :: proc(hWnd: HWND) -> BOOL --- BringWindowToTop :: proc(hWnd: HWND) -> BOOL --- GetTopWindow :: proc(hWnd: HWND) -> HWND --- SetForegroundWindow :: proc(hWnd: HWND) -> BOOL --- From 65bf7f6653573e4eb92fe81ed4352066593c1191 Mon Sep 17 00:00:00 2001 From: jakubtomsu <66876057+jakubtomsu@users.noreply.github.com> Date: Sun, 23 Apr 2023 20:00:25 +0200 Subject: [PATCH 2/4] Remove typo --- core/reflect/types.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/reflect/types.odin b/core/reflect/types.odin index bfe894733..cad9b1f66 100644 --- a/core/reflect/types.odin +++ b/core/reflect/types.odin @@ -563,7 +563,7 @@ write_type_writer :: proc(w: io.Writer, ti: ^Type_Info, n_written: ^int = nil) - case .None: // Ignore case .Fixed: io.write_string(w, "#soa[", &n) or_return - io.write_i64(w, i64(info.soa_len), 10 &n) or_return + io.write_i64(w, i64(info.soa_len), 10) or_return io.write_byte(w, ']', &n) or_return write_type(w, info.soa_base_type, &n) or_return return From dbebe9e92ca163b125034f16220b316767aa769b Mon Sep 17 00:00:00 2001 From: Jan Prukner Date: Mon, 24 Apr 2023 21:43:34 +0200 Subject: [PATCH 3/4] Fix which command check The function have_witch failed because which is an alias in my environment. This change makes the function work even if which command is an alias. --- build_odin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_odin.sh b/build_odin.sh index 62943732f..860cb388f 100755 --- a/build_odin.sh +++ b/build_odin.sh @@ -157,7 +157,7 @@ run_demo() { } have_which() { - if ! [ -x "$(command -v which)" ]; then + if ! command -v which 2>&1 ; then panic "Could not find \`which\`" fi } From 19097bc5bc2e5254eb6bae2b03877c9d678a0523 Mon Sep 17 00:00:00 2001 From: Jan Prukner Date: Tue, 25 Apr 2023 07:06:36 +0200 Subject: [PATCH 4/4] add redirect to /dev/null --- build_odin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_odin.sh b/build_odin.sh index 860cb388f..9f4e7101a 100755 --- a/build_odin.sh +++ b/build_odin.sh @@ -157,7 +157,7 @@ run_demo() { } have_which() { - if ! command -v which 2>&1 ; then + if ! command -v which > /dev/null 2>&1 ; then panic "Could not find \`which\`" fi }