-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugs/sdl gettick reset #7
base: knulli
Are you sure you want to change the base?
Conversation
- Changed SDL_GetTicks() to be std::chrono::steady_clock::now() - Changed how totalTime is calculated. - Original - totalTime has the total time elapsed since the start of the event loop on each loop so it will be a larger time than the time since the start if it iterates more than once in the loop. - Changed: - totalTime is only the time elapsed since the start of the event loop.
playVideo within es-app/main.cppChanges
I'm not sure if we would ever launch a program that would cause the SDL_GetTicks() to be reset while we're playing a video so although this "could" result in an issue if not fixed, I'm not sure if this would be experienced. |
- Changed usage of SDL_GetTicks() to std::chrono::steady_clock
main within es-app/main.cppChanges
Potential Impacts
|
- ScraperHttpRequest & ImageDownloadHandle - Converted from SDL_GetTicks() to std::chrono::steady_clock - Code changed deals with hold off when HTTP 429/Too Many Requests is received and how the hold-off is handled.
ScraperHttpRequest/ImageDownloadHandleChanges
Original code
Warning
|
- Removed usage of SDL_GetTicks(). Code is not used and likely left over from some timing code to tell how long the .pdf extractions took at some point.
ApiSystem::extractPdfImages in ApiSystem.cppChanges
|
- Converted from SDL_GetTicks() to std::chrono::steady_clock
ViewController::reloadAllChanges
|
- Adjusted debug log (time to save) to std::chrono::system_clock from SDL_GetTick()
es-core: SystemConf::saveSystemConfChanges
|
- Converted timing from SDL_GetTicks() to std::chrono::steady_clock - Could potentially fix bugs in fading caused by SDL_GetTicks() being reset.
es-core: GuiInfoPopup::updateChanges
Potential Bug Fixes
|
- Converted from SDL_GetTicks() to std::chrono::steady_clock - Use of SDL_GetTicks() could cause fade in not to work if the SDL Tick gets reset for things that use the Video component.
es-core: VideoComponent::handleStartDelay VideoComponent::update VideoComponent::startVideoWithDelay Changes
Potential Bug Fixes
|
Testing Notes: [5 of 9] Will track testing status of the changes here. VideoComponent
GuiInfoPopup
Save System Config [Tested]
ViewController::Reloadall [Tested]
ApiSystem::extractPdf Images [Tested]
ScraperHttpRequest
ImageDownloadHandler
Power Save in Main [Tested]
Playvideo in main [Tested]
Bugs Created |
- Fixed bug where ps_time was used instead of lastTime
Fix usage of SDL_GetTicks() throughout ES. This is separate from the issue causing the Battery % as these changes can have a more widespread impact.
The general fix is to convert from using SDL_GetTicks() which can be reset to 0 to use std::chrono::steady_clock.