From 78e724408a285ae67bd127732f0f9d5523652d4b Mon Sep 17 00:00:00 2001 From: oakes Date: Mon, 24 Mar 2014 00:02:54 -0400 Subject: [PATCH] Allow size! to work with any camera --- src/play_clj/core_cameras.clj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/play_clj/core_cameras.clj b/src/play_clj/core_cameras.clj index 5286a8d..9353389 100644 --- a/src/play_clj/core_cameras.clj +++ b/src/play_clj/core_cameras.clj @@ -45,8 +45,10 @@ (size! screen 480 360)" [screen width height] - (let [^OrthographicCamera camera (u/get-obj screen :camera)] - (.setToOrtho camera false width height))) + (let [^Camera camera (u/get-obj screen :camera)] + (set! (. camera viewportWidth) width) + (set! (. camera viewportHeight) height) + (.update camera))) (defn width! "Sets the width of the camera in `screen`, adjusting the height so the ratio