small improvements

This commit is contained in:
mrbesen 2022-04-23 19:41:21 +02:00
parent a63143c3df
commit 6fedcabd9b
Signed by untrusted user: MrBesen
GPG Key ID: 596B2350DCD67504
2 changed files with 5 additions and 2 deletions

View File

@ -120,7 +120,7 @@ void LolAutoAccept::enterSearch(const std::string& text) {
void LolAutoAccept::pickFirst(const std::string& search) {
enterSearch(search);
performClick(3); // first champion
performClick(3, false); // first champion
}
LolAutoAccept::LolAutoAccept() : acceptmatcher("imgs/Accept.png"), arrowmatcher("imgs/arrowdown.png"), banmatcher("imgs/ban.png"), sim(XInputSimulator::getInstance()) {

View File

@ -119,7 +119,10 @@ void ScreenShot::take(cv::Mat& cv_img) {
if (init)
init = false;
updateAttrib();
// window not viewable
if(!updateAttrib()) {
cv_img.create(0, 0, 0);
}
XShmGetImage(display, window, ximg, 0, 0, 0x00ffffff);
cv_img = cv::Mat(wattrib.height, wattrib.width, CV_8UC4, ximg->data);