Skip to content

Commit

Permalink
fix: 修复传参的顺序错误
Browse files Browse the repository at this point in the history
  • Loading branch information
neko-para committed Oct 20, 2023
1 parent 93ef576 commit 3cad822
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/MaaFramework/API/MaaController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MaaControllerHandle MaaAdbControllerCreate(MaaStringView adb_path, MaaStringView
<< "is about to be deprecated, and we recommend using MaaAdbControllerCreateV2 instead.";

constexpr std::string_view kDefaultAgentPath = "./MaaAgentBinary";
return MaaAdbControllerCreateV2(adb_path, address, type, kDefaultAgentPath.data(), config, callback, callback_arg);
return MaaAdbControllerCreateV2(adb_path, address, type, config, kDefaultAgentPath.data(), callback, callback_arg);
}

MaaControllerHandle MaaAdbControllerCreateV2(MaaStringView adb_path, MaaStringView address, MaaAdbControllerType type,
Expand Down
4 changes: 3 additions & 1 deletion source/MaaRpc/cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
std::mutex mutex;
std::condition_variable cv;
bool quiet = false;
bool quit = false;

void sig_handler(int)
{
if (!quiet) {
std::cout << "Quit from interrupt" << std::endl;
}
quit = true;
std::unique_lock<std::mutex> lock(mutex);
cv.notify_all();
}
Expand Down Expand Up @@ -57,7 +59,7 @@ int main(int argc, char* argv[])
if (!quiet) {
std::cout << "Server listening on " << server_address << std::endl;
}
cv.wait(lock);
cv.wait(lock, []() { return quit; });

std::cout << "Start stopping" << std::endl;
MaaRpcStop();
Expand Down

0 comments on commit 3cad822

Please sign in to comment.