Merge branch '12.0' into metal

This commit is contained in:
Alex Szpakowski
2020-02-15 14:18:35 -04:00
53 changed files with 3120 additions and 3687 deletions
+7 -7
View File
@@ -465,8 +465,8 @@ bool Window::setWindow(int width, int height, WindowSettings *settings)
if (!graphics.get())
graphics.set(Module::getInstance<graphics::Graphics>(Module::M_GRAPHICS));
if (graphics.get() && graphics->isCanvasActive())
throw love::Exception("love.window.setMode cannot be called while a Canvas is active in love.graphics.");
if (graphics.get() && graphics->isRenderTargetActive())
throw love::Exception("love.window.setMode cannot be called while a render target is active in love.graphics.");
auto renderer = graphics->getRenderer();
@@ -702,8 +702,8 @@ void Window::close(bool allowExceptions)
{
if (graphics.get())
{
if (allowExceptions && graphics->isCanvasActive())
throw love::Exception("love.window.close cannot be called while a Canvas is active in love.graphics.");
if (allowExceptions && graphics->isRenderTargetActive())
throw love::Exception("love.window.close cannot be called while a render target is active in love.graphics.");
graphics->unSetMode();
}
@@ -740,8 +740,8 @@ bool Window::setFullscreen(bool fullscreen, Window::FullscreenType fstype)
if (!window)
return false;
if (graphics.get() && graphics->isCanvasActive())
throw love::Exception("love.window.setFullscreen cannot be called while a Canvas is active in love.graphics.");
if (graphics.get() && graphics->isRenderTargetActive())
throw love::Exception("love.window.setFullscreen cannot be called while a render target is active in love.graphics.");
WindowSettings newsettings = settings;
newsettings.fullscreen = fullscreen;
@@ -979,7 +979,7 @@ bool Window::setIcon(love::image::ImageData *imgd)
int w = imgd->getWidth();
int h = imgd->getHeight();
int bytesperpixel = (int) getPixelFormatSize(imgd->getFormat());
int bytesperpixel = (int) getPixelFormatBlockSize(imgd->getFormat());
int pitch = w * bytesperpixel;
SDL_Surface *sdlicon = nullptr;