mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Rename internal uses of canvas to texture/render target
This commit is contained in:
@@ -432,8 +432,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.");
|
||||
|
||||
WindowSettings f;
|
||||
|
||||
@@ -664,8 +664,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();
|
||||
}
|
||||
@@ -694,8 +694,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;
|
||||
|
||||
Reference in New Issue
Block a user