Skip to content

Commit

Permalink
default fullscreen scaling=ON
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneSchwettmann committed Mar 18, 2017
1 parent e42140d commit 3452922
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/Load.lua
Expand Up @@ -169,9 +169,16 @@ function love.load()

-- initialize GFX mode
love.window.setMode( 0, 0, {fullscreen=false, vsync=false, msaa=0} )
desktopWidth,desktopHeight,fullscreen,vsyncEnabled,fsaa=love.window.getMode()
local flags={}
desktopWidth,desktopHeight,flags=love.window.getMode()
fullscreen=flags.fullscreen
vsyncEnabled=flags.vsync
fsaa=flags.msaa
initializeFullscreenMode()
love.graphics.setDefaultFilter("nearest","nearest")
if fullscreen then
toggleScaling()
end

--canvas1X=love.graphics.newCanvas(width,height)
--canvas1X:setFilter("nearest","nearest")
Expand Down
16 changes: 14 additions & 2 deletions src/ScreenModes.lua
Expand Up @@ -12,7 +12,13 @@ end
function initializeWindowedMode()
local width,height=2*width,2*height
love.window.setMode( width, height, {fullscreen=false, vsync=false, msaa=0} )
fullscreenWidth,fullscreenHeight,fullscreen,vSyncEnabled,fsaa=love.window.getMode()

local flags={}
fullscreenWidth,fullscreenHeight,flags=love.window.getMode()
fullscreen=flags.fullscreen
vsyncEnabled=flags.vsync
fsaa=flags.msaa

love.window.setTitle("Arne's Spacetaxi")
borderX=0
borderY=0
Expand All @@ -24,7 +30,13 @@ function initializeFullscreenMode()
local width=2*width
local height=2*height
love.window.setMode( desktopWidth, desktopHeight, {fullscreen=true, vsync=true, msaa=0} )
fullscreenWidth,fullscreenHeight,fullscreen,vSyncEnabled,fsaa=love.window.getMode()

local flags={}
fullscreenWidth,fullscreenHeight,flags=love.window.getMode()
fullscreen=flags.fullscreen
vsyncEnabled=flags.vsync
fsaa=flags.msaa

if fullscreenWidth>width then
borderX=math.floor((fullscreenWidth-width)/2)
end
Expand Down

0 comments on commit 3452922

Please sign in to comment.