mirror of
https://github.com/erickdavestech/ps5-dualsense-overlay.git
synced 2026-10-06 10:00:14 +02:00
CRLF line endings broke scripts/prepare_ps5_deps.sh in CI. Only line endings change; the build output is identical. Signed-off-by: erickdavestech <54048831+erickdavestech@users.noreply.github.com>
42 lines
978 B
C++
42 lines
978 B
C++
/*
|
|
* Common FPS for PS5
|
|
* Copyright (C) 2026 porhe911
|
|
* Modifications Copyright (C) 2026 erickdavestech
|
|
*
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
#include "common_fps/config.hpp"
|
|
#include "common_fps/types.hpp"
|
|
|
|
#include <cassert>
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <type_traits>
|
|
|
|
using namespace common_fps;
|
|
|
|
int main() {
|
|
const auto cfg = default_config();
|
|
|
|
// Current public UI defaults.
|
|
assert(cfg.corner == Corner::TopLeft);
|
|
assert(cfg.font_size == 24);
|
|
|
|
// Integer-only public transport.
|
|
OverlayFrame frame;
|
|
frame.loading = false;
|
|
frame.fps = 59;
|
|
static_assert(std::is_same_v<decltype(frame.fps), int>);
|
|
|
|
// Ensure our source model never needs a decimal string.
|
|
const std::string display =
|
|
std::string("FPS: ") + std::to_string(frame.fps);
|
|
|
|
assert(display == "FPS: 59");
|
|
assert(display.find('.') == std::string::npos);
|
|
|
|
std::cout << "v1.2.0 public defaults: PASS\n";
|
|
return 0;
|
|
}
|