diff --git a/src/drivers/Qt/TasEditor/TasEditorWindow.h b/src/drivers/Qt/TasEditor/TasEditorWindow.h index d6a3e387..da35ccee 100644 --- a/src/drivers/Qt/TasEditor/TasEditorWindow.h +++ b/src/drivers/Qt/TasEditor/TasEditorWindow.h @@ -286,14 +286,14 @@ class QPianoRoll : public QWidget int columnUnderMouseAtPress; int markerDragFrameNumber; int markerDragCountdown; - int drawingStartTimestamp; int wheelPixelCounter; int headerItemUnderMouse; - int nextHeaderUpdateTime; int scroll_x; int scroll_y; int mouse_x; int mouse_y; + clock_t drawingStartTimestamp; + clock_t nextHeaderUpdateTime; int playbackCursorPos; diff --git a/src/drivers/Qt/TasEditor/bookmarks.cpp b/src/drivers/Qt/TasEditor/bookmarks.cpp index 45b29584..721cb658 100644 --- a/src/drivers/Qt/TasEditor/bookmarks.cpp +++ b/src/drivers/Qt/TasEditor/bookmarks.cpp @@ -77,6 +77,7 @@ BOOKMARKS::BOOKMARKS(QWidget *parent) calcFontData(); redrawFlag = false; + nextFlashUpdateTime = 0; } BOOKMARKS::~BOOKMARKS(void) diff --git a/src/drivers/Qt/TasEditor/bookmarks.h b/src/drivers/Qt/TasEditor/bookmarks.h index 1a20cda9..bfe957f9 100644 --- a/src/drivers/Qt/TasEditor/bookmarks.h +++ b/src/drivers/Qt/TasEditor/bookmarks.h @@ -1,6 +1,7 @@ // Specification file for Bookmarks class #pragma once #include +#include #include #include @@ -41,7 +42,7 @@ enum BOOKMARK_COMMANDS #define ITEM_UNDER_MOUSE_CLOUD (-1) #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 enum @@ -126,8 +127,8 @@ private: // not saved vars std::vector commands; int selectedSlot; - int nextFlashUpdateTime; int mouseX, mouseY; + clock_t nextFlashUpdateTime; // GUI stuff QFont font; diff --git a/src/drivers/Qt/TasEditor/branches.h b/src/drivers/Qt/TasEditor/branches.h index 2c309e2c..22b7ee0f 100644 --- a/src/drivers/Qt/TasEditor/branches.h +++ b/src/drivers/Qt/TasEditor/branches.h @@ -178,7 +178,7 @@ private: // not saved vars int transitionPhase; int currentAnimationFrame; - int nextAnimationTime; + clock_t nextAnimationTime; int playbackCursorX, playbackCursorY; double cornersCursorX, cornersCursorY; std::vector branchX; // in pixels diff --git a/src/drivers/Qt/TasEditor/greenzone.cpp b/src/drivers/Qt/TasEditor/greenzone.cpp index 6954d155..0b8d879f 100644 --- a/src/drivers/Qt/TasEditor/greenzone.cpp +++ b/src/drivers/Qt/TasEditor/greenzone.cpp @@ -35,6 +35,7 @@ static char greenzone_skipsave_id[GREENZONE_ID_LEN] = "GREENZONX"; GREENZONE::GREENZONE() { + nextCleaningTime = 0; } void GREENZONE::init() diff --git a/src/drivers/Qt/TasEditor/greenzone.h b/src/drivers/Qt/TasEditor/greenzone.h index db6cd5b9..194ae4ae 100644 --- a/src/drivers/Qt/TasEditor/greenzone.h +++ b/src/drivers/Qt/TasEditor/greenzone.h @@ -61,6 +61,6 @@ private: std::vector> savestates; // not saved data - int nextCleaningTime; + clock_t nextCleaningTime; }; diff --git a/src/drivers/Qt/TasEditor/history.h b/src/drivers/Qt/TasEditor/history.h index 989c4acc..8de1156f 100644 --- a/src/drivers/Qt/TasEditor/history.h +++ b/src/drivers/Qt/TasEditor/history.h @@ -157,10 +157,10 @@ private: int historySize; int undoHintPos, oldUndoHintPos; - int undoHintTimer; + clock_t undoHintTimer; bool showUndoHint, oldShowUndoHint; bool updateScheduled; - int nextAutocompressTime; + clock_t nextAutocompressTime; }; diff --git a/src/drivers/Qt/TasEditor/playback.h b/src/drivers/Qt/TasEditor/playback.h index 18a9cc5d..5256c4b9 100644 --- a/src/drivers/Qt/TasEditor/playback.h +++ b/src/drivers/Qt/TasEditor/playback.h @@ -90,7 +90,7 @@ private: bool forwardButtonState, forwardButtonOldState; bool rewindFullButtonState, rewindFullButtonOldState; bool forwardFullButtonState, forwardFullButtonOldState; - int buttonHoldTimer; + clock_t buttonHoldTimer; int seekingBeginningFrame; }; diff --git a/src/drivers/Qt/TasEditor/selection.h b/src/drivers/Qt/TasEditor/selection.h index 84b464a3..cff23dd6 100644 --- a/src/drivers/Qt/TasEditor/selection.h +++ b/src/drivers/Qt/TasEditor/selection.h @@ -4,6 +4,7 @@ #include #include #include +#include #include @@ -103,7 +104,7 @@ private: bool previousMarkerButtonState, previousMarkerButtonOldState; bool nextMarkerButtonState, nextMarkerButtonOldState; - int buttonHoldTimer; + clock_t buttonHoldTimer; std::vector rowsSelectionHistory; diff --git a/src/drivers/Qt/TasEditor/taseditor_project.h b/src/drivers/Qt/TasEditor/taseditor_project.h index d9eb0169..aaa000d9 100644 --- a/src/drivers/Qt/TasEditor/taseditor_project.h +++ b/src/drivers/Qt/TasEditor/taseditor_project.h @@ -24,7 +24,6 @@ #define LVS_EX_DOUBLEBUFFER 0x00010000 #endif -//#define AUTOSAVE_PERIOD_SCALE 60000 // = 1 minute in milliseconds #define AUTOSAVE_PERIOD_SCALE (60 * CLOCKS_PER_SEC) // = 1 minute in milliseconds #define MARKERS_SAVED 1 @@ -70,7 +69,7 @@ public: private: bool changed; bool updateCaptionFlag; - int nextSaveShedule; + clock_t nextSaveShedule; std::string projectFile; // full path std::string projectName; // file name only