Fix windows bug

This commit is contained in:
2024-02-02 16:44:01 +08:00
parent 8e995f0474
commit 88ab0ec2d8

View File

@@ -253,7 +253,7 @@ bool FlutterWindow::OnCreate() {
device.SetMethodCallHandler([&](const flutter::MethodCall<>& call, std::unique_ptr<flutter::MethodResult<>> result) {
if (call.method_name() == "deviceName") {
wchar_t name[MAX_COMPUTERNAME_LENGTH + 1];
DWORD size = 0;
DWORD size = MAX_COMPUTERNAME_LENGTH + 1;
if (!GetComputerNameW(name, &size)) {
result->Success();
return;