diff --git a/src/gui/render.cpp b/src/gui/render.cpp index d929f6f..02eb2ca 100644 --- a/src/gui/render.cpp +++ b/src/gui/render.cpp @@ -811,10 +811,10 @@ int Render::CreateMainWindow() { if (std::abs(dpi_scale_ - dpi_scale) > 0.01f) { dpi_scale_ = dpi_scale; - main_window_width_ = (int)(main_window_width_ * dpi_scale_); - main_window_height_ = (int)(main_window_height_ * dpi_scale_); - stream_window_width_ = (int)(stream_window_width_ * dpi_scale_); - stream_window_height_ = (int)(stream_window_height_ * dpi_scale_); + main_window_width_ = (int)(main_window_width_default_ * dpi_scale_); + main_window_height_ = (int)(main_window_height_default_ * dpi_scale_); + stream_window_width_ = (int)(stream_window_width_default_ * dpi_scale_); + stream_window_height_ = (int)(stream_window_height_default_ * dpi_scale_); SDL_SetWindowSize(main_window_, (int)main_window_width_, (int)main_window_height_); @@ -869,6 +869,9 @@ int Render::CreateStreamWindow() { return 0; } + stream_window_width_ = (int)(stream_window_width_default_ * dpi_scale_); + stream_window_height_ = (int)(stream_window_height_default_ * dpi_scale_); + stream_ctx_ = ImGui::CreateContext(); if (!stream_ctx_) { LOG_ERROR("Stream context is null");