mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 04:41:15 +02:00
Small changes, still trying to figure out judder
This commit is contained in:
parent
0c4c97d3f9
commit
d91158f07c
1 changed files with 6 additions and 1 deletions
|
@ -5430,7 +5430,7 @@ void Application::toggleLogDialog() {
|
|||
}
|
||||
|
||||
#define SNAPSNOT_ANIMATED_WIDTH (720)
|
||||
#define SNAPSNOT_ANIMATED_FRAMERATE_FPS (50)
|
||||
#define SNAPSNOT_ANIMATED_FRAMERATE_FPS (30)
|
||||
#define SNAPSNOT_ANIMATED_DURATION_SECS (3)
|
||||
|
||||
#define SNAPSNOT_ANIMATED_FRAME_DELAY_MSEC (1000/SNAPSNOT_ANIMATED_FRAMERATE_FPS)
|
||||
|
@ -5478,6 +5478,9 @@ void Application::takeSnapshot(bool notify, const QString& format, float aspectR
|
|||
cstr = new char[fname.size() + 1]; // Create a new character array to hold the .GIF file location
|
||||
strcpy(cstr, fname.c_str()); // Copy the string into a character array
|
||||
|
||||
// Ensure the snapshot timer is Precise (attempted millisecond precision)
|
||||
animatedSnapshotTimer.setTimerType(Qt::PreciseTimer);
|
||||
|
||||
// Connect the animatedSnapshotTimer QTimer to the lambda slot function
|
||||
connect(&animatedSnapshotTimer, &QTimer::timeout, [=] {
|
||||
// If this is the last frame...
|
||||
|
@ -5509,6 +5512,8 @@ void Application::takeSnapshot(bool notify, const QString& format, float aspectR
|
|||
GifBegin(&(qApp->_animatedSnapshotGifWriter), cstr, frame.width(), frame.height(), SNAPSNOT_ANIMATED_FRAME_DELAY_MSEC/10, 8, false);
|
||||
}
|
||||
|
||||
qDebug() << "Frame time: " << usecTimestampNow();
|
||||
|
||||
// Write the frame to the gif
|
||||
GifWriteFrame(&(qApp->_animatedSnapshotGifWriter), (uint8_t*)frame.bits(), frame.width(), frame.height(), SNAPSNOT_ANIMATED_FRAME_DELAY_MSEC/10, 8, false);
|
||||
// Increment the current snapshot frame count
|
||||
|
|
Loading…
Reference in a new issue