diff --git a/catroid/src/main/java/org/catrobat/catroid/stage/StageListener.java b/catroid/src/main/java/org/catrobat/catroid/stage/StageListener.java index 04e3152d78a..2a4060357b5 100644 --- a/catroid/src/main/java/org/catrobat/catroid/stage/StageListener.java +++ b/catroid/src/main/java/org/catrobat/catroid/stage/StageListener.java @@ -1,6 +1,6 @@ /* * Catroid: An on-device visual programming system for Android devices - * Copyright (C) 2010-2022 The Catrobat Team + * Copyright (C) 2010-2023 The Catrobat Team * () * * This program is free software: you can redistribute it and/or modify @@ -727,10 +727,11 @@ public void clearBackground() { } private void initScreenMode() { + screenshotWidth = ScreenValues.getScreenWidthForProject(project); + screenshotHeight = ScreenValues.getScreenHeightForProject(project); + switch (project.getScreenMode()) { case STRETCH: - screenshotWidth = ScreenValues.getScreenWidthForProject(project); - screenshotHeight = ScreenValues.getScreenHeightForProject(project); screenshotX = 0; screenshotY = 0; viewPort = new ScalingViewport(Scaling.stretch, virtualWidth, virtualHeight, camera);