mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
fix resizeWindow
This commit is contained in:
@@ -50,7 +50,11 @@ bool Assistance::setSimulatorType(SimulatorType type)
|
||||
m_pCtrl = std::make_shared<WinMacro>(static_cast<HandleType>(int_type | static_cast<int>(HandleType::Control)));
|
||||
m_pWindow = std::make_shared<WinMacro>(static_cast<HandleType>(int_type | static_cast<int>(HandleType::Window)));
|
||||
m_pView = std::make_shared<WinMacro>(static_cast<HandleType>(int_type | static_cast<int>(HandleType::View)));
|
||||
return m_pCtrl->findHandle() && m_pWindow->findHandle() && m_pView->findHandle();
|
||||
bool ret = m_pCtrl->findHandle() && m_pWindow->findHandle() && m_pView->findHandle();
|
||||
if (ret) {
|
||||
m_pWindow->resizeWindow(1200, 720);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void Assistance::start()
|
||||
@@ -127,8 +131,6 @@ void Assistance::identify_function(Assistance* pThis)
|
||||
|
||||
void Assistance::control_function(Assistance* pThis)
|
||||
{
|
||||
pThis->m_pWindow->resizeWindow(1200, 720);
|
||||
|
||||
while (!pThis->m_control_exit) {
|
||||
std::unique_lock<std::mutex> lock(pThis->m_tasks_mutex);
|
||||
if (pThis->m_control_running && !pThis->m_tasks.empty()) {
|
||||
|
||||
@@ -174,7 +174,6 @@
|
||||
<ClInclude Include="Assistance.h" />
|
||||
<ClInclude Include="Configer.h" />
|
||||
<ClInclude Include="Identify.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="WinMacro.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -63,7 +63,7 @@ bool WinMacro::resizeWindow(int width, int height)
|
||||
return false;
|
||||
}
|
||||
|
||||
return ::MoveWindow(m_handle, 100, 100, width, height, true);
|
||||
return ::MoveWindow(m_handle, 0, 0, width, height, true);
|
||||
}
|
||||
|
||||
double WinMacro::getScreenScale()
|
||||
|
||||
Reference in New Issue
Block a user