lib/screen_tracker.rb in sensible-cinema-0.14.6 vs lib/screen_tracker.rb in sensible-cinema-0.15.0
- old
+ new
@@ -1,9 +1,9 @@
require 'win32/screenshot'
require 'sane'
require 'yaml'
-require_relative 'ocr'
+require File.dirname(__FILE__)+ '/ocr'
class ScreenTracker
def self.new_from_yaml yaml, callback
settings = YAML.load yaml
@@ -32,10 +32,10 @@
end
end
@height = height
@x = x; @y = y; @x2 = x+width; @y2 = y+height; @callback = callback
@max_x = max_x
- raise 'poor width or wrong window' if @x2 > max_x || @x2 == x
+ raise "poor width or wrong window #{@x2} #{max_x} #{x}" if @x2 > max_x || @x2 == x
if @y2 > max_y || @y2 == y
raise 'poor height or wrong window'
end
@digits = digits
@previously_displayed_warning = false
\ No newline at end of file