Skip to content

Commit

Permalink
fix: sample
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Oct 25, 2023
1 parent cc935b2 commit 544d12b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sample/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ int main([[maybe_unused]] int argc, char** argv)
}

const int kIndex = 0; // for demo, we just use the first device
auto agent_path = "share" / "MaaAgentBinary";
std::string agent_path = "share/MaaAgentBinary";
auto controller_handle =
MaaAdbControllerCreateV2(MaaToolKitGetDeviceAdbPath(kIndex), MaaToolKitGetDeviceAdbSerial(kIndex),
MaaToolKitGetDeviceAdbControllerType(kIndex), MaaToolKitGetDeviceAdbConfig(kIndex),
agent_path.string().c_str(), nullptr, nullptr);
agent_path.c_str(), nullptr, nullptr);
auto ctrl_id = MaaControllerPostConnection(controller_handle);

auto resource_handle = MaaResourceCreate(nullptr, nullptr);
auto resource_dir = "my_resource";
auto res_id = MaaResourcePostPath(resource_handle, resource_dir.string().c_str());
std::string resource_dir = "my_resource";
auto res_id = MaaResourcePostPath(resource_handle, resource_dir.c_str());

MaaControllerWait(controller_handle, ctrl_id);
MaaResourceWait(resource_handle, res_id);
Expand Down

0 comments on commit 544d12b

Please sign in to comment.