mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Merge default into minor
--HG-- branch : minor
This commit is contained in:
@@ -501,13 +501,15 @@ void Canvas::startGrab()
|
||||
gl.setFramebufferSRGB(false);
|
||||
}
|
||||
|
||||
if (attachedCanvases.size() == 0)
|
||||
return;
|
||||
if (attachedCanvases.size() > 0)
|
||||
{
|
||||
// Make sure the FBO is only using a single draw buffer.
|
||||
// GLES3 only has glDrawBuffers, so we avoid using glDrawBuffer.
|
||||
const GLenum buffers[] = {GL_COLOR_ATTACHMENT0};
|
||||
glDrawBuffers(1, buffers);
|
||||
|
||||
// Make sure the FBO is only using a single draw buffer.
|
||||
glDrawBuffer(GL_COLOR_ATTACHMENT0);
|
||||
|
||||
attachedCanvases.clear();
|
||||
attachedCanvases.clear();
|
||||
}
|
||||
}
|
||||
|
||||
void Canvas::stopGrab(bool switchingToOtherCanvas)
|
||||
|
||||
@@ -352,13 +352,17 @@ function love.graphics.newVideo(file, loadaudio)
|
||||
local video = love.graphics._newVideo(file)
|
||||
local source, success
|
||||
|
||||
if loadaudio ~= false then
|
||||
if loadaudio ~= false and love.audio then
|
||||
success, source = pcall(love.audio.newSource, video:getStream():getFilename(), "stream")
|
||||
end
|
||||
if success then
|
||||
video:setSource(source)
|
||||
elseif loadaudio == true then
|
||||
error("Video had no audio track", 2)
|
||||
if love.audio then
|
||||
error("Video had no audio track", 2)
|
||||
else
|
||||
error("love.audio was not loaded", 2)
|
||||
end
|
||||
else
|
||||
video:getStream():setSync()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user