mirror of
https://github.com/niellun/FastCarPlay.git
synced 2026-06-07 09:38:25 +02:00
More info
This commit is contained in:
+13
-10
@@ -436,12 +436,12 @@ void Application::loop()
|
||||
interface.debug(debugBuffer);
|
||||
}
|
||||
|
||||
std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now();
|
||||
frameTime = (int32_t)std::chrono::duration_cast<std::chrono::microseconds>(now - frameStart).count();
|
||||
frameStart = now;
|
||||
if (_active && !Settings::vsync && !_state.dirty)
|
||||
{
|
||||
std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now();
|
||||
frameTime = (int32_t)std::chrono::duration_cast<std::chrono::microseconds>(now - frameStart).count();
|
||||
frameDelay = (frameTarget - frameTime) * ((decoder.buffer.latestId() == frameId) ? 1.0 : 0.9);
|
||||
frameStart = now;
|
||||
if (frameDelay > 0)
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::microseconds(frameDelay));
|
||||
@@ -470,6 +470,7 @@ const std::string Application::status() const
|
||||
<< SDL_GetCurrentVideoDriver();
|
||||
|
||||
SDL_Window *window = SDL_GetKeyboardFocus();
|
||||
SDL_RendererInfo cr{};
|
||||
if (window)
|
||||
{
|
||||
int width = 0;
|
||||
@@ -479,23 +480,25 @@ const std::string Application::status() const
|
||||
SDL_Renderer *renderer = SDL_GetRenderer(window);
|
||||
if (renderer)
|
||||
{
|
||||
SDL_RendererInfo info{};
|
||||
if (SDL_GetRendererInfo(renderer, &info) == 0)
|
||||
if (SDL_GetRendererInfo(renderer, &cr) == 0)
|
||||
{
|
||||
out << " " << info.name
|
||||
<< ((info.flags & SDL_RENDERER_ACCELERATED) != 0 ? " accelerated" : "")
|
||||
<< ((info.flags & SDL_RENDERER_PRESENTVSYNC) != 0 ? " vsync" : "");
|
||||
out << ((cr.flags & SDL_RENDERER_ACCELERATED) != 0 ? " accelerated" : "")
|
||||
<< ((cr.flags & SDL_RENDERER_PRESENTVSYNC) != 0 ? " vsync" : "");
|
||||
}
|
||||
}
|
||||
}
|
||||
out << " " << SDL_GetCurrentAudioDriver();
|
||||
out << " audio: " << SDL_GetCurrentAudioDriver();
|
||||
|
||||
out << "\nBACKENDS:";
|
||||
for (int i = 0; i < SDL_GetNumRenderDrivers(); ++i)
|
||||
{
|
||||
SDL_RendererInfo info;
|
||||
SDL_GetRenderDriverInfo(i, &info);
|
||||
out << " " << info.name;
|
||||
out << " ";
|
||||
if(cr.name == info.name)
|
||||
out << "[" << info.name << "]";
|
||||
else
|
||||
out << info.name;
|
||||
}
|
||||
|
||||
int displayIndex = SDL_GetWindowDisplayIndex(window);
|
||||
|
||||
Reference in New Issue
Block a user