Review screen capture / gif recording #1540
This commit is contained in:
parent
407c014eb4
commit
01b7509a39
1 changed files with 6 additions and 6 deletions
12
src/core.c
12
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!
|
// NOTE: Before closing window, while loop must be left!
|
||||||
}
|
}
|
||||||
|
#if defined(SUPPORT_SCREEN_CAPTURE)
|
||||||
else if (key == GLFW_KEY_F12 && action == GLFW_PRESS)
|
else if (key == GLFW_KEY_F12 && action == GLFW_PRESS)
|
||||||
{
|
{
|
||||||
#if defined(SUPPORT_GIF_RECORDING)
|
#if defined(SUPPORT_GIF_RECORDING)
|
||||||
|
@ -4648,14 +4649,13 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif // SUPPORT_GIF_RECORDING
|
#endif // SUPPORT_GIF_RECORDING
|
||||||
#if defined(SUPPORT_SCREEN_CAPTURE)
|
|
||||||
{
|
{
|
||||||
TakeScreenshot(TextFormat("screenshot%03i.png", screenshotCounter));
|
TakeScreenshot(TextFormat("screenshot%03i.png", screenshotCounter));
|
||||||
screenshotCounter++;
|
screenshotCounter++;
|
||||||
}
|
}
|
||||||
#endif // SUPPORT_SCREEN_CAPTURE
|
|
||||||
}
|
}
|
||||||
|
#endif // SUPPORT_SCREEN_CAPTURE
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// WARNING: GLFW could return GLFW_REPEAT, we need to consider it as 1
|
// 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.
|
// Time to close the window.
|
||||||
CORE.Window.shouldClose = true;
|
CORE.Window.shouldClose = true;
|
||||||
}
|
}
|
||||||
|
#if defined(SUPPORT_SCREEN_CAPTURE)
|
||||||
else if (key == KEY_F12 && down)
|
else if (key == KEY_F12 && down)
|
||||||
{
|
{
|
||||||
#if defined(SUPPORT_GIF_RECORDING)
|
#if defined(SUPPORT_GIF_RECORDING)
|
||||||
|
@ -6011,14 +6012,13 @@ void UWPKeyDownEvent(int key, bool down, bool controlKey)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif // SUPPORT_GIF_RECORDING
|
#endif // SUPPORT_GIF_RECORDING
|
||||||
#if defined(SUPPORT_SCREEN_CAPTURE)
|
|
||||||
{
|
{
|
||||||
TakeScreenshot(TextFormat("screenshot%03i.png", screenshotCounter));
|
TakeScreenshot(TextFormat("screenshot%03i.png", screenshotCounter));
|
||||||
screenshotCounter++;
|
screenshotCounter++;
|
||||||
}
|
}
|
||||||
#endif // SUPPORT_SCREEN_CAPTURE
|
|
||||||
}
|
}
|
||||||
|
#endif // SUPPORT_SCREEN_CAPTURE
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CORE.Input.Keyboard.currentKeyState[key] = down;
|
CORE.Input.Keyboard.currentKeyState[key] = down;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue