Split Linux FPS title reporting
This commit is contained in:
35
src/platform_linux/linux_platform_services.cpp
Normal file
35
src/platform_linux/linux_platform_services.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#include "platform_linux/linux_platform_services.h"
|
||||
|
||||
#ifdef __LINUX__
|
||||
#include <string>
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#include "app.h"
|
||||
|
||||
namespace pp::platform::linux {
|
||||
namespace {
|
||||
|
||||
void linux_update_fps(int frames)
|
||||
{
|
||||
App::I->title("PanoPainter - " + std::to_string(frames) + " FPS");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void report_rendered_frames(int frames)
|
||||
{
|
||||
linux_update_fps(frames);
|
||||
}
|
||||
|
||||
}
|
||||
#else
|
||||
namespace pp::platform::linux {
|
||||
|
||||
void report_rendered_frames(int frames)
|
||||
{
|
||||
(void)frames;
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
7
src/platform_linux/linux_platform_services.h
Normal file
7
src/platform_linux/linux_platform_services.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace pp::platform::linux {
|
||||
|
||||
void report_rendered_frames(int frames);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user