mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 10:00:44 +08:00
feat: 新增检测最快截图方式后输出截图方法和耗时
This commit is contained in:
@@ -427,6 +427,16 @@ bool asst::AdbController::screencap(cv::Mat& image_payload, bool allow_reconnect
|
||||
{ AdbProperty::ScreencapMethod::Encode, "Encode" },
|
||||
};
|
||||
Log.info("The fastest way is", MethodName.at(m_adb.screencap_method), ", cost:", min_cost.count(), "ms");
|
||||
json::value info = json::object {
|
||||
{ "uuid", m_uuid },
|
||||
{ "what", "FastestWayToScreencap" },
|
||||
{ "details",
|
||||
json::object {
|
||||
{ "method", MethodName.at(m_adb.screencap_method) },
|
||||
{ "cost", min_cost.count() },
|
||||
} },
|
||||
};
|
||||
callback(AsstMsg::ConnectionInfo, info);
|
||||
clear_lf_info();
|
||||
return m_adb.screencap_method != AdbProperty::ScreencapMethod::UnknownYet;
|
||||
} break;
|
||||
|
||||
@@ -455,6 +455,10 @@ namespace MaaWpfGui.Main
|
||||
case "TouchModeNotAvailable":
|
||||
Instances.TaskQueueViewModel.AddLog(LocalizationHelper.GetString("TouchModeNotAvailable"), UiLogColor.Error);
|
||||
break;
|
||||
|
||||
case "FastestWayToScreencap":
|
||||
Instances.TaskQueueViewModel.AddLog(string.Format(LocalizationHelper.GetString("FastestWayToScreencap"), details["details"]?["method"]?.ToString(), details["details"]?["cost"]?.ToString()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -556,6 +556,7 @@ The video aspect ratio needs to be 16:9 without interference factors such as bla
|
||||
<system:String x:Key="ReconnectFailed">Reconnection failed. The connection is down!</system:String>
|
||||
<system:String x:Key="TouchModeNotAvailable">Touch mode is not available, please go to 「Settings - Connection Settings」 to switch to a different touch mode.</system:String>
|
||||
<system:String x:Key="ScreencapFailed">Screencap failed. If it happens repeatedly, try to restart or change the emulator!</system:String>
|
||||
<system:String x:Key="FastestWayToScreencap">Fastest screenshot method: {0}, time taken: {1:#,#}ms</system:String>
|
||||
<system:String x:Key="IdentifyTheMistakes">Recognition error</system:String>
|
||||
<system:String x:Key="TaskError" xml:space="preserve">Task error: </system:String>
|
||||
<system:String x:Key="CombatError">Combat error</system:String>
|
||||
|
||||
@@ -556,6 +556,7 @@ Bilibili: ログイン インターフェイスに表示されるアカウント
|
||||
<system:String x:Key="ReconnectFailed">再接続に失敗、切断されました!</system:String>
|
||||
<system:String x:Key="TouchModeNotAvailable">タッチモードは利用できません。設定-接続設定に入って、他のタッチモードに変更してください。</system:String>
|
||||
<system:String x:Key="ScreencapFailed">スクリーンキャプチャに失敗しました。繰り返し発生する場合は、エミュレータの再起動または変更をお試しください!</system:String>
|
||||
<system:String x:Key="FastestWayToScreencap">最速のスクリーンショット方法: {0}, 所要時間: {1:#,#}ms</system:String>
|
||||
<system:String x:Key="IdentifyTheMistakes">認識エラー</system:String>
|
||||
<system:String x:Key="TaskError" xml:space="preserve">タスクエラー: </system:String>
|
||||
<system:String x:Key="CombatError">戦闘エラー</system:String>
|
||||
|
||||
@@ -556,6 +556,7 @@ Bilibili: 로그인 인터페이스에 표시되는 계정 이름(예: 장산)
|
||||
<system:String x:Key="ReconnectFailed">다시 연결하지 못했습니다. 연결 해제되었습니다!</system:String>
|
||||
<system:String x:Key="TouchModeNotAvailable">터치 수행 방식이 사용 불가능합니다. 설정 - 연결 설정에서 다른 방식으로 변경해 주세요.</system:String>
|
||||
<system:String x:Key="ScreencapFailed">스크린샷 캡처에 실패했습니다. 반복적으로 발생 시 에뮬레이터를 다시 시작하거나 변경해 보세요!</system:String>
|
||||
<system:String x:Key="FastestWayToScreencap">가장 빠른 스크린샷 방법: {0}, 소요 시간: {1:#,#}ms</system:String>
|
||||
<system:String x:Key="IdentifyTheMistakes">인식 오류</system:String>
|
||||
<system:String x:Key="TaskError" xml:space="preserve">작업 오류: </system:String>
|
||||
<system:String x:Key="CombatError">작전 오류</system:String>
|
||||
|
||||
@@ -556,6 +556,7 @@
|
||||
<system:String x:Key="ReconnectFailed">重连失败,连接断开!</system:String>
|
||||
<system:String x:Key="TouchModeNotAvailable">触控模式不可用。请进入 设置 - 连接设置 切换其他触控模式。</system:String>
|
||||
<system:String x:Key="ScreencapFailed">截图失败,如反复出现请尝试重启或更换模拟器!</system:String>
|
||||
<system:String x:Key="FastestWayToScreencap">最快截图方式: {0}, 耗时: {1:#,#}ms</system:String>
|
||||
<system:String x:Key="IdentifyTheMistakes">识别错误</system:String>
|
||||
<system:String x:Key="TaskError" xml:space="preserve">任务出错: </system:String>
|
||||
<system:String x:Key="CombatError">战斗出错</system:String>
|
||||
|
||||
@@ -556,6 +556,7 @@
|
||||
<system:String x:Key="ReconnectFailed">重連失敗,連接斷開!</system:String>
|
||||
<system:String x:Key="TouchModeNotAvailable">觸控模式不可用。請進入 設定 - 連接設定 切換其他觸控模式。</system:String>
|
||||
<system:String x:Key="ScreencapFailed">截圖失敗,如反覆出現請嘗試重開或更換模擬器!</system:String>
|
||||
<system:String x:Key="FastestWayToScreencap">最快截圖方式: {0}, 耗時: {1:#,#}ms</system:String>
|
||||
<system:String x:Key="IdentifyTheMistakes">辨識錯誤</system:String>
|
||||
<system:String x:Key="TaskError" xml:space="preserve">任務出錯: </system:String>
|
||||
<system:String x:Key="CombatError">戰鬥出錯</system:String>
|
||||
|
||||
Reference in New Issue
Block a user