Compare commits

...

3 Commits

Author SHA1 Message Date
Daniel K. O. (dkosmari)
c8dbca8fad Use steady/monotonic clock for the timers, so they can handle realtime clock jumps. 2024-06-01 10:18:09 +02:00
Maschell
36993e1630 make sure gOverlayFrame is valid 2024-05-06 17:35:14 +02:00
dependabot[bot]
5801f61ec7 Bump wiiu-env/devkitppc from 20240423 to 20240505
Bumps wiiu-env/devkitppc from 20240423 to 20240505.

---
updated-dependencies:
- dependency-name: wiiu-env/devkitppc
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 10:20:14 +02:00
3 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,4 @@
FROM ghcr.io/wiiu-env/devkitppc:20240423
FROM ghcr.io/wiiu-env/devkitppc:20240505
COPY --from=ghcr.io/wiiu-env/libnotifications:20240426 /artifacts $DEVKITPRO
COPY --from=ghcr.io/wiiu-env/libmappedmemory:20230621 /artifacts $DEVKITPRO

View File

@ -72,6 +72,9 @@ void drawScreenshotSavedTexture2(GX2ColorBuffer *colorBuffer, GX2ScanTarget scan
}
static void TryAddFromQueue() {
if (!gOverlayFrame) {
return;
}
std::lock_guard overlay_lock(gOverlayFrameMutex);
// Add notification that had been called before the overlay was ready
for (const auto &notification : gOverlayQueueDuringStartup) {

View File

@ -3,15 +3,15 @@
class Timer {
public:
Timer() { clock_gettime(CLOCK_REALTIME, &beg_); }
Timer() { clock_gettime(CLOCK_MONOTONIC, &beg_); }
double elapsed() {
clock_gettime(CLOCK_REALTIME, &end_);
clock_gettime(CLOCK_MONOTONIC, &end_);
return end_.tv_sec - beg_.tv_sec +
(end_.tv_nsec - beg_.tv_nsec) / 1000000000.;
}
void reset() { clock_gettime(CLOCK_REALTIME, &beg_); }
void reset() { clock_gettime(CLOCK_MONOTONIC, &beg_); }
private:
timespec beg_, end_;