turning off screenshots.

This commit is contained in:
Bryce Covert
2017-03-23 21:27:26 -07:00
parent dc58787bf6
commit e208b96335
2 changed files with 16 additions and 31 deletions

View File

@@ -7,7 +7,6 @@ obvious about calculating path? seems to just pause a long time
Reenable mobile screenshots - Static images for mobile screenshots? Reenable mobile screenshots - Static images for mobile screenshots?
Lying down at start of jail Lying down at start of jail
Two finger panning?
Pinching end is wrong, sometimes clicks Pinching end is wrong, sometimes clicks
Improve padding on text so it's more clickable Improve padding on text so it's more clickable

View File

@@ -212,22 +212,6 @@
(def screenshot-chan (chan)) (def screenshot-chan (chan))
(defn publish-screenshot-fn [] (defn publish-screenshot-fn []
(iosify
(do
(import '[advent.core Saver])
(log/info "Taking IOS screenshot...")
(let [screenshot-data (advent.core.Saver/takeScreenshot)]
(fn []
(let [png-data (.getBytes (.toPNGData screenshot-data))
_ (.dispose screenshot-data)
big (Pixmap. png-data 0 (alength png-data))
resized (Pixmap. 160 120 Pixmap$Format/RGB888)]
(.drawPixmap resized big 0 0 (.getWidth big) (.getHeight big) 0 0 160 120)
(.dispose big)
(let [result (advent.core.Saver/flipPixmap resized)]
(.dispose resized)
result)))))
(do (do
(log/info "Taking Desktop screenshot...") (log/info "Taking Desktop screenshot...")
(Pixmap/setFilter Pixmap$Filter/BiLinear) (Pixmap/setFilter Pixmap$Filter/BiLinear)
@@ -237,7 +221,7 @@
resized (Pixmap. 160 120 Pixmap$Format/RGB888)] resized (Pixmap. 160 120 Pixmap$Format/RGB888)]
(.drawPixmap resized pm 0 0 (.getWidth pm) (.getHeight pm) 0 0 160 120) (.drawPixmap resized pm 0 0 (.getWidth pm) (.getHeight pm) 0 0 160 120)
(.dispose pm) (.dispose pm)
(fn [] resized))))) (fn [] resized))))
(defn save [entities id name & [blurb]] (defn save [entities id name & [blurb]]
@@ -253,10 +237,12 @@
(log/info "writing save file...") (log/info "writing save file...")
(steam/write-bytes (steam/save-file-name id) (.getBytes (pr-str save) "UTF-8")) (steam/write-bytes (steam/save-file-name id) (.getBytes (pr-str save) "UTF-8"))
(iosify
nil
(on-gl (let [gl-func (fn [] (on-gl (let [gl-func (fn []
(log/info "Screenshot captured. Publishing for persistence") (log/info "Screenshot captured. Publishing for persistence")
(put! screenshot-chan [id (publish-screenshot-fn)]))] (put! screenshot-chan [id (publish-screenshot-fn)]))]
(try-times gl-func 3)) )))] (try-times gl-func 3)) ))))]
(try-times save-fn 3))) (try-times save-fn 3)))
(defn listen-for-screenshots [] (defn listen-for-screenshots []