summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRay <[email protected]>2021-03-01 23:51:32 +0100
committerRay <[email protected]>2021-03-01 23:51:32 +0100
commit5902cc6d9b95b08a4dd96461beb2afbb241a23ce (patch)
tree559280db07422c41de0eb8429c65803058314f1b
parent3f6a08535fab019512f7c4560878d76fee77f83a (diff)
downloadraylib-5902cc6d9b95b08a4dd96461beb2afbb241a23ce.tar.gz
raylib-5902cc6d9b95b08a4dd96461beb2afbb241a23ce.zip
REVIEWED: GetScreen*() #1570
Now GetScreenWidth() and GetScreenHeight() return the current fbo width and height.
-rw-r--r--src/core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core.c b/src/core.c
index 60620085..78a21cc5 100644
--- a/src/core.c
+++ b/src/core.c
@@ -1429,13 +1429,13 @@ void SetWindowSize(int width, int height)
// Get current screen width
int GetScreenWidth(void)
{
- return CORE.Window.screen.width;
+ return CORE.Window.currentFbo.width;
}
// Get current screen height
int GetScreenHeight(void)
{
- return CORE.Window.screen.height;
+ return CORE.Window.currentFbo.height;
}
// Get native window handle
@@ -1987,9 +1987,9 @@ void EndTextureMode(void)
// Set viewport to default framebuffer size
SetupViewport(CORE.Window.render.width, CORE.Window.render.height);
- // Reset current screen size
- CORE.Window.currentFbo.width = GetScreenWidth();
- CORE.Window.currentFbo.height = GetScreenHeight();
+ // Reset current fbo to screen size
+ CORE.Window.currentFbo.width = CORE.Window.screen.width;
+ CORE.Window.currentFbo.height = CORE.Window.screen.height;
}
// Begin scissor mode (define screen area for following drawing)