-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add FRIZ_VBLANK_ENABLED macro, bump version #
- Loading branch information
Brett g Porter
committed
Feb 12, 2023
1 parent
c865d49
commit 1f620f9
Showing
4 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,11 @@ | |
#include <juce_gui_basics/juce_gui_basics.h> | ||
#include <juce_gui_extra/juce_gui_extra.h> | ||
|
||
#if JUCE_VERSION >= (7 << 16) | ||
#define FRIZ_VBLANK_ENABLED 1 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
bgporter
Owner
|
||
#else | ||
#define FRIZ_VBLANK_ENABLED 0 | ||
#endif | ||
namespace friz | ||
{ | ||
class Animator; | ||
|
@@ -176,11 +181,14 @@ class TimeController : public Controller, | |
int frameRate { 30 }; | ||
}; | ||
|
||
#if FRIZ_VBLANK_ENABLED | ||
/** | ||
* @class DisplaySyncController | ||
* | ||
* @brief Synchronize animations with a display's vertical blank interval. | ||
* | ||
* @warning This class is only available in code targeting JUCE 7.0.0 or higher | ||
* | ||
*/ | ||
class DisplaySyncController : public Controller | ||
{ | ||
|
@@ -234,7 +242,7 @@ class DisplaySyncController : public Controller | |
FrameRateCalculator frameRate; | ||
bool running { false }; | ||
}; | ||
|
||
#endif | ||
/** | ||
* @class AsyncController | ||
* @brief Controller to support clocking an animation manually, or at rates | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just a note, VBlank support wasn't added until 7.0.3.