1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

[Windows] Fix LLVM MinGW build.

This commit is contained in:
bruvzg
2022-10-06 09:30:25 +03:00
parent ea9bb98f26
commit 6afb2d0225
3 changed files with 9 additions and 8 deletions

View File

@@ -2260,8 +2260,6 @@ Error VulkanContext::swap_buffers() {
} }
} }
#endif #endif
static int total_frames = 0;
total_frames++;
// print_line("current buffer: " + itos(current_buffer)); // print_line("current buffer: " + itos(current_buffer));
err = fpQueuePresentKHR(present_queue, &present); err = fpQueuePresentKHR(present_queue, &present);

View File

@@ -1361,7 +1361,8 @@ void DisplayServerWindows::window_set_flag(WindowFlags p_flag, bool p_enabled, W
if (p_enabled) { if (p_enabled) {
//enable per-pixel alpha //enable per-pixel alpha
DWM_BLURBEHIND bb = { 0 }; DWM_BLURBEHIND bb;
ZeroMemory(&bb, sizeof(bb));
HRGN hRgn = CreateRectRgn(0, 0, -1, -1); HRGN hRgn = CreateRectRgn(0, 0, -1, -1);
bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION; bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION;
bb.hRgnBlur = hRgn; bb.hRgnBlur = hRgn;
@@ -1373,7 +1374,8 @@ void DisplayServerWindows::window_set_flag(WindowFlags p_flag, bool p_enabled, W
//disable per-pixel alpha //disable per-pixel alpha
wd.layered_window = false; wd.layered_window = false;
DWM_BLURBEHIND bb = { 0 }; DWM_BLURBEHIND bb;
ZeroMemory(&bb, sizeof(bb));
HRGN hRgn = CreateRectRgn(0, 0, -1, -1); HRGN hRgn = CreateRectRgn(0, 0, -1, -1);
bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION; bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION;
bb.hRgnBlur = hRgn; bb.hRgnBlur = hRgn;
@@ -1390,7 +1392,7 @@ void DisplayServerWindows::window_set_flag(WindowFlags p_flag, bool p_enabled, W
ERR_FAIL_COND_MSG(IsWindowVisible(wd.hWnd) && (wd.is_popup != p_enabled), "Popup flag can't changed while window is opened."); ERR_FAIL_COND_MSG(IsWindowVisible(wd.hWnd) && (wd.is_popup != p_enabled), "Popup flag can't changed while window is opened.");
wd.is_popup = p_enabled; wd.is_popup = p_enabled;
} break; } break;
case WINDOW_FLAG_MAX: default:
break; break;
} }
} }
@@ -1419,7 +1421,7 @@ bool DisplayServerWindows::window_get_flag(WindowFlags p_flag, WindowID p_window
case WINDOW_FLAG_POPUP: { case WINDOW_FLAG_POPUP: {
return wd.is_popup; return wd.is_popup;
} break; } break;
case WINDOW_FLAG_MAX: default:
break; break;
} }

View File

@@ -295,11 +295,12 @@ String OS_Windows::get_distribution_name() const {
} }
String OS_Windows::get_version() const { String OS_Windows::get_version() const {
typedef LONG NTSTATUS, *PNTSTATUS; typedef LONG NTSTATUS;
typedef NTSTATUS(WINAPI * RtlGetVersionPtr)(PRTL_OSVERSIONINFOW); typedef NTSTATUS(WINAPI * RtlGetVersionPtr)(PRTL_OSVERSIONINFOW);
RtlGetVersionPtr version_ptr = (RtlGetVersionPtr)GetProcAddress(GetModuleHandle("ntdll.dll"), "RtlGetVersion"); RtlGetVersionPtr version_ptr = (RtlGetVersionPtr)GetProcAddress(GetModuleHandle("ntdll.dll"), "RtlGetVersion");
if (version_ptr != nullptr) { if (version_ptr != nullptr) {
RTL_OSVERSIONINFOW fow = { 0 }; RTL_OSVERSIONINFOW fow;
ZeroMemory(&fow, sizeof(fow));
fow.dwOSVersionInfoSize = sizeof(fow); fow.dwOSVersionInfoSize = sizeof(fow);
if (version_ptr(&fow) == 0x00000000) { if (version_ptr(&fow) == 0x00000000) {
return vformat("%d.%d.%d", (int64_t)fow.dwMajorVersion, (int64_t)fow.dwMinorVersion, (int64_t)fow.dwBuildNumber); return vformat("%d.%d.%d", (int64_t)fow.dwMajorVersion, (int64_t)fow.dwMinorVersion, (int64_t)fow.dwBuildNumber);