TannerRogalsky / love.js

LÖVE ported to the web using Emscripten
MIT License
493 stars 53 forks source link

in release-compatibility love.resize( w, h ) is triger with "w == 0" and "h == 0" #33

Closed spectrenoir06 closed 7 years ago

spectrenoir06 commented 8 years ago

in release-compatibility love.resize( w, h ) is triger with "w == 0" and "h == 0" ( not in debug)

code

function love.load()
    print("load")
end

function love.resize(w, h)
    print("resize",w,h)
end

love

load
resize  0   0
resize  720 480
TannerRogalsky commented 8 years ago

@spectrenoir06 Sorry, I thought this would be easy to reproduce but it isn't happening for me in Chrome on OSX. Can you tell me your Browser and OS?

spectrenoir06 commented 8 years ago

Sorry you need to add a conf.lua ( not resizable by default)

i get the error with this one

function love.conf(t)

    t.identity              = nil          -- The name of the save directory (string)
    ---t.version               = "0.10.0"      -- The LÖVE version this game was made for (string)
    t.console               = true         -- Attach a console (boolean, Windows only)

    t.window.title          = "" -- The window title (string)
    --t.window.icon           = "media/icone.png"  -- Filepath to an image to use as the window's icon (string)
    t.window.width          = 1280       -- The window width (number)
    t.window.height         = 720        -- The window height (number)
    t.window.borderless     = false        -- Remove all border visuals from the window (boolean)
    t.window.resizable      = true        -- Let the window be user-resizable (boolean)
    t.window.minwidth       = 720            -- Minimum window width if the window is resizable (number)
    t.window.minheight      = 480            -- Minimum window height if the window is resizable (number)
    t.window.fullscreen     = false        -- Enable fullscreen (boolean)
    t.window.fullscreentype = "exclusive"    -- Standard exclusive or desktop fullscreen mode (string)
    t.window.vsync          = true         -- Enable vertical sync (boolean)
    t.window.fsaa           = 0            -- The number of samples to use with multi-sampled antialiasing (number)
    t.window.display        = 2            -- Index of the monitor to show the window in (number)

    t.modules.audio         = true         -- Enable the audio module (boolean)
    t.modules.event         = true         -- Enable the event module (boolean)
    t.modules.graphics      = true         -- Enable the graphics module (boolean)
    t.modules.image         = true         -- Enable the image module (boolean)
    t.modules.joystick      = true         -- Enable the joystick module (boolean)
    t.modules.keyboard      = true         -- Enable the keyboard module (boolean)
    t.modules.math          = true         -- Enable the math module (boolean)
    t.modules.mouse         = true         -- Enable the mouse module (boolean)
    t.modules.physics       = true         -- Enable the physics module (boolean)
    t.modules.sound         = true         -- Enable the sound module (boolean)
    t.modules.system        = true         -- Enable the system module (boolean)
    t.modules.timer         = true         -- Enable the timer module (boolean)
    t.modules.window        = true         -- Enable the window module (boolean)
end

it doesn't appear in debug only in release-compatibility Chromium version 48.0.2564.82 Ubuntu 15.04 (64-bit)

TannerRogalsky commented 7 years ago

release-compatibility has been removed in 0.11 so this should not longer be relevant.