Skip to content

Commit

Permalink
Use appropriate size for render
Browse files Browse the repository at this point in the history
  • Loading branch information
dcvz committed Jul 10, 2023
1 parent e9c78a2 commit d590cb9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl<'a> Gui<'a> {

pub fn process_draw_lists(&mut self, commands: usize) -> anyhow::Result<()> {
// Set RDP output dimensions
let size = self.gfx_renderer.window_size();
let size = self.gfx_renderer.content_size();
let dimensions = OutputDimensions {
width: size.width,
height: size.height,
Expand Down
2 changes: 1 addition & 1 deletion src/gui/glium_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl<'a> Renderer<'a> {

// Rendering Functions

pub fn window_size(&self) -> winit::dpi::PhysicalSize<u32> {
pub fn content_size(&self) -> winit::dpi::PhysicalSize<u32> {
self.display.gl_window().window().inner_size()
}

Expand Down
4 changes: 2 additions & 2 deletions src/gui/wgpu_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl<'a> Renderer<'a> {
.with_resizable(true)
.build(&event_loop_wrapper.event_loop)?;

let size = window.outer_size();
let size = window.inner_size();

let surface = unsafe { instance.create_surface(&window) }?;

Expand Down Expand Up @@ -163,7 +163,7 @@ impl<'a> Renderer<'a> {

// Rendering Functions

pub fn window_size(&self) -> winit::dpi::PhysicalSize<u32> {
pub fn content_size(&self) -> winit::dpi::PhysicalSize<u32> {
self.window.inner_size()
}

Expand Down

0 comments on commit d590cb9

Please sign in to comment.