From 2ab453ac53e4c2a9d23a58a12c5403d2b6b96b69 Mon Sep 17 00:00:00 2001 From: 1029chris <1029chris@gmail.com> Date: Tue, 14 Jun 2016 14:28:20 -0700 Subject: Window resolution settings work now Detect computers supported resolutions --- var.lua | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'var.lua') diff --git a/var.lua b/var.lua index 5848ac5..def6b2d 100644 --- a/var.lua +++ b/var.lua @@ -209,21 +209,17 @@ function loadVar() stre[1] = {} stre[1].title = "Native" stre[1].hl = true - stre[2] = {} - stre[2].title = "1280x720" - stre[2].hl = false - stre[3] = {} - stre[3].title = "1920x1080" - stre[3].hl = false - stre[4] = {} - stre[4].title = "1280x1024" - stre[4].hl = false - stre[5] = {} - stre[5].title = "1440x900" - stre[5].hl = false - stre[6] = {} - stre[6].title = "1366x768" - stre[6].hl = false + modes = love.window.getFullscreenModes() + for i=1,#modes do + if modes[i].width >= 1000 and modes[i].height >= 720 and i <= 10 then + table.insert(stre, { + title = modes[i].width .. "x" .. modes[i].height, + hl = false, + w = modes[i].width, + h = modes[i].height, + }) + end + end f = {} f.home = {} f.home[1] = {name="Documents",x=0,y=0,hl=false} -- cgit