aboutsummaryrefslogtreecommitdiffstats
path: root/src/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.rs')
-rw-r--r--src/client.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client.rs b/src/client.rs
index d111732..b71b83c 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -19,6 +19,7 @@ use bevy::input::keyboard::*;
use bevy::input::mouse::MouseButton;
use bevy::prelude::*;
use bevy::sprite::{MaterialMesh2dBundle, Mesh2dHandle};
+use bevy::window::*;
use lightyear::client::connection::ConnectionManager;
use lightyear::client::events::*;
use lightyear::prelude::client::ClientConnection;
@@ -34,9 +35,16 @@ pub fn main(
transport: TransportConfig,
champion: Champion,
faction: Faction,
+ scale_factor: f32,
) {
App::new()
- .add_plugins(DefaultPlugins)
+ .add_plugins(DefaultPlugins.set(WindowPlugin {
+ primary_window: Some(Window {
+ resolution: WindowResolution::default().with_scale_factor_override(scale_factor),
+ ..Default::default()
+ }),
+ ..Default::default()
+ }))
.add_plugins(ClientPlugin {
server_addr,
client_id,