mirror of
https://github.com/love2d/love.git
synced 2026-08-14 10:13:46 +02:00
Fix a crash related to love.graphics.push and love.window.setMode.
This commit is contained in:
@@ -63,6 +63,9 @@ Graphics::Graphics()
|
||||
states.reserve(10);
|
||||
states.push_back(DisplayState());
|
||||
|
||||
pixelSizeStack.reserve(5);
|
||||
pixelSizeStack.push_back(1);
|
||||
|
||||
if (currentWindow.get())
|
||||
{
|
||||
int w, h;
|
||||
@@ -313,10 +316,6 @@ bool Graphics::setMode(int width, int height)
|
||||
// Restore the graphics state.
|
||||
restoreState(states.back());
|
||||
|
||||
pixelSizeStack.clear();
|
||||
pixelSizeStack.reserve(5);
|
||||
pixelSizeStack.push_back(1);
|
||||
|
||||
int gammacorrect = isGammaCorrect() ? 1 : 0;
|
||||
|
||||
// We always need a default shader.
|
||||
|
||||
Reference in New Issue
Block a user