Swapped out time int types for proper clock_t type.

This commit is contained in:
mjbudd77 2021-12-29 20:33:13 -05:00
parent 96c1f588e4
commit be81d1870c
10 changed files with 15 additions and 12 deletions

View File

@ -286,14 +286,14 @@ class QPianoRoll : public QWidget
int columnUnderMouseAtPress; int columnUnderMouseAtPress;
int markerDragFrameNumber; int markerDragFrameNumber;
int markerDragCountdown; int markerDragCountdown;
int drawingStartTimestamp;
int wheelPixelCounter; int wheelPixelCounter;
int headerItemUnderMouse; int headerItemUnderMouse;
int nextHeaderUpdateTime;
int scroll_x; int scroll_x;
int scroll_y; int scroll_y;
int mouse_x; int mouse_x;
int mouse_y; int mouse_y;
clock_t drawingStartTimestamp;
clock_t nextHeaderUpdateTime;
int playbackCursorPos; int playbackCursorPos;

View File

@ -77,6 +77,7 @@ BOOKMARKS::BOOKMARKS(QWidget *parent)
calcFontData(); calcFontData();
redrawFlag = false; redrawFlag = false;
nextFlashUpdateTime = 0;
} }
BOOKMARKS::~BOOKMARKS(void) BOOKMARKS::~BOOKMARKS(void)

View File

@ -1,6 +1,7 @@
// Specification file for Bookmarks class // Specification file for Bookmarks class
#pragma once #pragma once
#include <vector> #include <vector>
#include <time.h>
#include <QFont> #include <QFont>
#include <QTimer> #include <QTimer>
@ -41,7 +42,7 @@ enum BOOKMARK_COMMANDS
#define ITEM_UNDER_MOUSE_CLOUD (-1) #define ITEM_UNDER_MOUSE_CLOUD (-1)
#define ITEM_UNDER_MOUSE_FIREBALL (TOTAL_BOOKMARKS) #define ITEM_UNDER_MOUSE_FIREBALL (TOTAL_BOOKMARKS)
#define BOOKMARKS_FLASH_TICK 100 // in milliseconds #define BOOKMARKS_FLASH_TICK (100 * CLOCKS_PER_SEC / 1000) // in milliseconds
// listview columns // listview columns
enum enum
@ -126,8 +127,8 @@ private:
// not saved vars // not saved vars
std::vector<int> commands; std::vector<int> commands;
int selectedSlot; int selectedSlot;
int nextFlashUpdateTime;
int mouseX, mouseY; int mouseX, mouseY;
clock_t nextFlashUpdateTime;
// GUI stuff // GUI stuff
QFont font; QFont font;

View File

@ -178,7 +178,7 @@ private:
// not saved vars // not saved vars
int transitionPhase; int transitionPhase;
int currentAnimationFrame; int currentAnimationFrame;
int nextAnimationTime; clock_t nextAnimationTime;
int playbackCursorX, playbackCursorY; int playbackCursorX, playbackCursorY;
double cornersCursorX, cornersCursorY; double cornersCursorX, cornersCursorY;
std::vector<int> branchX; // in pixels std::vector<int> branchX; // in pixels

View File

@ -35,6 +35,7 @@ static char greenzone_skipsave_id[GREENZONE_ID_LEN] = "GREENZONX";
GREENZONE::GREENZONE() GREENZONE::GREENZONE()
{ {
nextCleaningTime = 0;
} }
void GREENZONE::init() void GREENZONE::init()

View File

@ -61,6 +61,6 @@ private:
std::vector<std::vector<uint8_t>> savestates; std::vector<std::vector<uint8_t>> savestates;
// not saved data // not saved data
int nextCleaningTime; clock_t nextCleaningTime;
}; };

View File

@ -157,10 +157,10 @@ private:
int historySize; int historySize;
int undoHintPos, oldUndoHintPos; int undoHintPos, oldUndoHintPos;
int undoHintTimer; clock_t undoHintTimer;
bool showUndoHint, oldShowUndoHint; bool showUndoHint, oldShowUndoHint;
bool updateScheduled; bool updateScheduled;
int nextAutocompressTime; clock_t nextAutocompressTime;
}; };

View File

@ -90,7 +90,7 @@ private:
bool forwardButtonState, forwardButtonOldState; bool forwardButtonState, forwardButtonOldState;
bool rewindFullButtonState, rewindFullButtonOldState; bool rewindFullButtonState, rewindFullButtonOldState;
bool forwardFullButtonState, forwardFullButtonOldState; bool forwardFullButtonState, forwardFullButtonOldState;
int buttonHoldTimer; clock_t buttonHoldTimer;
int seekingBeginningFrame; int seekingBeginningFrame;
}; };

View File

@ -4,6 +4,7 @@
#include <set> #include <set>
#include <map> #include <map>
#include <vector> #include <vector>
#include <time.h>
#include <QLineEdit> #include <QLineEdit>
@ -103,7 +104,7 @@ private:
bool previousMarkerButtonState, previousMarkerButtonOldState; bool previousMarkerButtonState, previousMarkerButtonOldState;
bool nextMarkerButtonState, nextMarkerButtonOldState; bool nextMarkerButtonState, nextMarkerButtonOldState;
int buttonHoldTimer; clock_t buttonHoldTimer;
std::vector<RowsSelection> rowsSelectionHistory; std::vector<RowsSelection> rowsSelectionHistory;

View File

@ -24,7 +24,6 @@
#define LVS_EX_DOUBLEBUFFER 0x00010000 #define LVS_EX_DOUBLEBUFFER 0x00010000
#endif #endif
//#define AUTOSAVE_PERIOD_SCALE 60000 // = 1 minute in milliseconds
#define AUTOSAVE_PERIOD_SCALE (60 * CLOCKS_PER_SEC) // = 1 minute in milliseconds #define AUTOSAVE_PERIOD_SCALE (60 * CLOCKS_PER_SEC) // = 1 minute in milliseconds
#define MARKERS_SAVED 1 #define MARKERS_SAVED 1
@ -70,7 +69,7 @@ public:
private: private:
bool changed; bool changed;
bool updateCaptionFlag; bool updateCaptionFlag;
int nextSaveShedule; clock_t nextSaveShedule;
std::string projectFile; // full path std::string projectFile; // full path
std::string projectName; // file name only std::string projectName; // file name only