diff --git a/docs/quickstart-cmake.md b/docs/quickstart-cmake.md index 00881b2f7e..96d39b90da 100644 --- a/docs/quickstart-cmake.md +++ b/docs/quickstart-cmake.md @@ -63,7 +63,6 @@ Now, create a `hello_webgpu.cpp` C++ file within the `TestDawn` directory. ```cpp #include -#include #include #include @@ -83,10 +82,10 @@ int main(int argc, char *argv[]) { callbackInfo.nextInChain = nullptr; callbackInfo.mode = wgpu::CallbackMode::WaitAnyOnly; callbackInfo.callback = [](WGPURequestAdapterStatus status, - WGPUAdapter adapter, const char *message, + WGPUAdapter adapter, WGPUStringView message, void *userdata) { if (status != WGPURequestAdapterStatus_Success) { - std::cerr << "Failed to get an adapter:" << message; + std::cerr << "Failed to get an adapter:" << message.data; return; } *static_cast(userdata) = wgpu::Adapter::Acquire(adapter); @@ -105,11 +104,11 @@ int main(int argc, char *argv[]) { adapter.GetInfo(&info); std::cout << "VendorID: " << std::hex << info.vendorID << std::dec << "\n"; - std::cout << "Vendor: " << info.vendor << "\n"; - std::cout << "Architecture: " << info.architecture << "\n"; + std::cout << "Vendor: " << info.vendor.data << "\n"; + std::cout << "Architecture: " << info.architecture.data << "\n"; std::cout << "DeviceID: " << std::hex << info.deviceID << std::dec << "\n"; - std::cout << "Name: " << info.device << "\n"; - std::cout << "Driver description: " << info.description << "\n"; + std::cout << "Name: " << info.device.data << "\n"; + std::cout << "Driver description: " << info.description.data << "\n"; return EXIT_SUCCESS; } ```