Skip to content

Commit

Permalink
Fallback to default value if framecap or update frequency can't be read
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed Dec 3, 2018
1 parent 967c718 commit 212349d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion orthographic/camera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ M.PROJECTOR.FIXED_ZOOM = hash("FIXED_ZOOM")

local DISPLAY_WIDTH = tonumber(sys.get_config("display.width")) or 960
local DISPLAY_HEIGHT = tonumber(sys.get_config("display.height")) or 640
local UPDATE_FREQUENCY = tonumber(sys.get_config("display.update_frequency")) or 60
local UPDATE_FREQUENCY = tonumber(sys.get_config("display.update_frequency") or sys.get_config("display.frame_cap"))
if UPDATE_FREQUENCY == 0 then UPDATE_FREQUENCY = 60 end

local WINDOW_WIDTH = DISPLAY_WIDTH
local WINDOW_HEIGHT = DISPLAY_HEIGHT
Expand Down

0 comments on commit 212349d

Please sign in to comment.