small improvements
This commit is contained in:
parent
a63143c3df
commit
6fedcabd9b
|
@ -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()) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue