We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa858db commit cf7d253Copy full SHA for cf7d253
src/sdl2/render.rs
@@ -194,8 +194,12 @@ impl TryFrom<u32> for ScaleMode {
194
195
fn try_from(n: u32) -> Result<Self, Self::Error> {
196
match n {
197
- x if x == crate::sys::SDL_ScaleMode::SDL_ScaleModeNearest as u32 => Ok(ScaleMode::Nearest),
198
- x if x == crate::sys::SDL_ScaleMode::SDL_ScaleModeLinear as u32 => Ok(ScaleMode::Linear),
+ x if x == crate::sys::SDL_ScaleMode::SDL_ScaleModeNearest as u32 => {
+ Ok(ScaleMode::Nearest)
199
+ }
200
+ x if x == crate::sys::SDL_ScaleMode::SDL_ScaleModeLinear as u32 => {
201
+ Ok(ScaleMode::Linear)
202
203
x if x == crate::sys::SDL_ScaleMode::SDL_ScaleModeBest as u32 => Ok(ScaleMode::Best),
204
_ => Err(()),
205
}
0 commit comments