fix(core): compile error without common-controls-v6 (#13719)

This commit is contained in:
Fabian-Lars 2025-06-27 15:54:10 +02:00 committed by GitHub
parent 6b2b9d6cbf
commit f010ca5e91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -0,0 +1,5 @@
---
tauri-runtime-wry: 'patch:bug'
---
Fixed a compile error when using tauri without the `common-controls-v6` feature enabled.

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use windows::core::{w, HSTRING, PCWSTR};
use windows::core::{w, HSTRING};
enum Level {
Error,
@ -33,7 +33,7 @@ fn dialog_inner(err: &str, level: Level) {
unsafe {
MessageBoxW(
None,
err,
&err,
title,
match level {
Level::Warning => MB_ICONWARNING,
@ -46,7 +46,7 @@ fn dialog_inner(err: &str, level: Level) {
#[cfg(feature = "common-controls-v6")]
{
use windows::core::HRESULT;
use windows::core::{HRESULT, PCWSTR};
use windows::Win32::Foundation::*;
use windows::Win32::UI::Controls::*;
use windows::Win32::UI::Shell::*;