mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'zesterer/fxupscale' into 'master'
Fixed window scale reset bug See merge request veloren/veloren!3675
This commit is contained in:
commit
1c1ff2189e
@ -412,7 +412,7 @@ impl SettingsChange {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
SettingsChange::Graphics(graphics_change) => {
|
SettingsChange::Graphics(graphics_change) => {
|
||||||
let mut change_all = false;
|
let mut change_preset = false;
|
||||||
|
|
||||||
match graphics_change {
|
match graphics_change {
|
||||||
Graphics::AdjustTerrainViewDistance(terrain_vd) => {
|
Graphics::AdjustTerrainViewDistance(terrain_vd) => {
|
||||||
@ -490,15 +490,23 @@ impl SettingsChange {
|
|||||||
},
|
},
|
||||||
Graphics::ResetGraphicsSettings => {
|
Graphics::ResetGraphicsSettings => {
|
||||||
settings.graphics = GraphicsSettings::default();
|
settings.graphics = GraphicsSettings::default();
|
||||||
change_all = true;
|
change_preset = true;
|
||||||
|
// Fullscreen mode
|
||||||
|
global_state
|
||||||
|
.window
|
||||||
|
.set_fullscreen_mode(settings.graphics.fullscreen);
|
||||||
|
// Window size
|
||||||
|
global_state
|
||||||
|
.window
|
||||||
|
.set_size(settings.graphics.window_size.into());
|
||||||
},
|
},
|
||||||
Graphics::ChangeGraphicsSettings(f) => {
|
Graphics::ChangeGraphicsSettings(f) => {
|
||||||
settings.graphics = f(settings.graphics.clone());
|
settings.graphics = f(settings.graphics.clone());
|
||||||
change_all = true;
|
change_preset = true;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if change_all {
|
if change_preset {
|
||||||
let graphics = &settings.graphics;
|
let graphics = &settings.graphics;
|
||||||
// View distance
|
// View distance
|
||||||
client_set_view_distance(settings, session_state);
|
client_set_view_distance(settings, session_state);
|
||||||
@ -521,10 +529,6 @@ impl SettingsChange {
|
|||||||
.renderer_mut()
|
.renderer_mut()
|
||||||
.set_render_mode(graphics.render_mode.clone())
|
.set_render_mode(graphics.render_mode.clone())
|
||||||
.unwrap();
|
.unwrap();
|
||||||
// Fullscreen mode
|
|
||||||
global_state.window.set_fullscreen_mode(graphics.fullscreen);
|
|
||||||
// Window size
|
|
||||||
global_state.window.set_size(graphics.window_size.into());
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
SettingsChange::Interface(interface_change) => {
|
SettingsChange::Interface(interface_change) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user