Make theme and DPI scaling updatable without re-launch

This commit is contained in:
Jamie Vital 2024-01-21 17:30:00 -05:00
parent 788870ac01
commit b4ffde125c
16 changed files with 125 additions and 114 deletions

View file

@ -11,7 +11,7 @@
namespace satdump
{
LoadingScreenSink::LoadingScreenSink(float scale) : scale{scale}
LoadingScreenSink::LoadingScreenSink()
{
image::Image<uint8_t> image;
std::random_device dev;
@ -64,6 +64,7 @@ namespace satdump
void LoadingScreenSink::push_frame(std::string str)
{
std::pair<int, int> dims = backend::beginFrame();
float scale = backend::device_scale;
ImGui::SetNextWindowPos({0, 0});
ImGui::SetNextWindowSize({(float)dims.first, (float)dims.second});
ImGui::Begin("Loading Screen", nullptr, NOWINDOW_FLAGS | ImGuiWindowFlags_NoDecoration);