summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
diff options
context:
space:
mode:
authorRay <[email protected]>2021-01-20 17:06:53 +0100
committerRay <[email protected]>2021-01-20 17:06:53 +0100
commit01b7509a396f4c060bb256ce2c5908d4ed9758ad (patch)
treea4dfb43c5f8ed3c1aba46ac62f63adc3287a78f4 /src/core.c
parent407c014eb4b12d8658b85c41d3f4615a4535a1f2 (diff)
downloadraylib-01b7509a396f4c060bb256ce2c5908d4ed9758ad.tar.gz
raylib-01b7509a396f4c060bb256ce2c5908d4ed9758ad.zip
Review screen capture / gif recording #1540
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core.c b/src/core.c
index 15aab363..d7bff21f 100644
--- a/src/core.c
+++ b/src/core.c
@@ -4606,6 +4606,7 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
// NOTE: Before closing window, while loop must be left!
}
+#if defined(SUPPORT_SCREEN_CAPTURE)
else if (key == GLFW_KEY_F12 && action == GLFW_PRESS)
{
#if defined(SUPPORT_GIF_RECORDING)
@@ -4648,14 +4649,13 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
}
}
else
-#endif // SUPPORT_GIF_RECORDING
-#if defined(SUPPORT_SCREEN_CAPTURE)
+#endif // SUPPORT_GIF_RECORDING
{
TakeScreenshot(TextFormat("screenshot%03i.png", screenshotCounter));
screenshotCounter++;
}
-#endif // SUPPORT_SCREEN_CAPTURE
}
+#endif // SUPPORT_SCREEN_CAPTURE
else
{
// WARNING: GLFW could return GLFW_REPEAT, we need to consider it as 1
@@ -5978,6 +5978,7 @@ void UWPKeyDownEvent(int key, bool down, bool controlKey)
// Time to close the window.
CORE.Window.shouldClose = true;
}
+#if defined(SUPPORT_SCREEN_CAPTURE)
else if (key == KEY_F12 && down)
{
#if defined(SUPPORT_GIF_RECORDING)
@@ -6011,14 +6012,13 @@ void UWPKeyDownEvent(int key, bool down, bool controlKey)
}
}
else
-#endif // SUPPORT_GIF_RECORDING
-#if defined(SUPPORT_SCREEN_CAPTURE)
+#endif // SUPPORT_GIF_RECORDING
{
TakeScreenshot(TextFormat("screenshot%03i.png", screenshotCounter));
screenshotCounter++;
}
-#endif // SUPPORT_SCREEN_CAPTURE
}
+#endif // SUPPORT_SCREEN_CAPTURE
else
{
CORE.Input.Keyboard.currentKeyState[key] = down;