Skip to content

Commit ddff297

Browse files
committed
Fix typo in hint.rs
1 parent 86fc6fb commit ddff297

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/sdl2/hint.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::ffi::{CString, CStr};
22
use sys;
33
use libc::c_char;
44

5-
const VIDEO_MINIMIZE_ON_FOCUS_LOST: &'static str = "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOST";
5+
const VIDEO_MINIMIZE_ON_FOCUS_LOSS: &'static str = "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS";
66

77
pub enum Hint {
88
Default,
@@ -20,13 +20,13 @@ pub enum Hint {
2020
///
2121
/// # Example
2222
/// ```rust,no_run
23-
/// sdl2::hint::set_video_minimize_on_focus_lost(false);
23+
/// sdl2::hint::set_video_minimize_on_focus_loss(false);
2424
/// ```
2525
///
2626
/// * `value`: `true` to enable minimizing of the Window if it loses key focus when in fullscreen mode,
2727
/// `false` to disable this feature.
28-
pub fn set_video_minimize_on_focus_lost(value: bool) -> bool {
29-
set(VIDEO_MINIMIZE_ON_FOCUS_LOST, if value { "1" } else { "0" })
28+
pub fn set_video_minimize_on_focus_loss(value: bool) -> bool {
29+
set(VIDEO_MINIMIZE_ON_FOCUS_LOSS, if value { "1" } else { "0" })
3030
}
3131

3232
/// A hint that specifies whether a fullscreen [Window](../video/Window.t.html) will be
@@ -36,16 +36,16 @@ pub fn set_video_minimize_on_focus_lost(value: bool) -> bool {
3636
///
3737
/// # Example
3838
/// ```rust,no_run
39-
/// sdl2::hint::set_video_minimize_on_focus_lost_with_priority(false, &sdl2::hint::Hint::Override);
39+
/// sdl2::hint::set_video_minimize_on_focus_loss_with_priority(false, &sdl2::hint::Hint::Override);
4040
/// ```
4141
///
4242
/// * `value`: `true` to enable minimizing of the Window if it loses key focus when in fullscreen mode,
4343
/// `false` to disable this feature.
4444
/// * `priority`: The priority controls the behavior when setting a hint that already has a value.
4545
/// Hints will replace existing hints of their priority and lower.
4646
/// Environment variables are considered to have override priority.
47-
pub fn set_video_minimize_on_focus_lost_with_priority(value: bool, priority: &Hint) -> bool {
48-
set_with_priority(VIDEO_MINIMIZE_ON_FOCUS_LOST, if value { "1" } else { "0" }, priority)
47+
pub fn set_video_minimize_on_focus_loss_with_priority(value: bool, priority: &Hint) -> bool {
48+
set_with_priority(VIDEO_MINIMIZE_ON_FOCUS_LOSS, if value { "1" } else { "0" }, priority)
4949
}
5050

5151
/// A hint that specifies whether a fullscreen [Window](../video/Window.t.html) will be
@@ -58,13 +58,13 @@ pub fn set_video_minimize_on_focus_lost_with_priority(value: bool, priority: &Hi
5858
///
5959
/// # Example
6060
/// ```rust,no_run
61-
/// assert_eq!(sdl2::hint::get_video_minimize_on_focus_lost(), true);
61+
/// assert_eq!(sdl2::hint::get_video_minimize_on_focus_loss(), true);
6262
///
63-
/// sdl2::hint::set_video_minimize_on_focus_lost(false);
64-
/// assert_eq!(sdl2::hint::get_video_minimize_on_focus_lost(), false);
63+
/// sdl2::hint::set_video_minimize_on_focus_loss(false);
64+
/// assert_eq!(sdl2::hint::get_video_minimize_on_focus_loss(), false);
6565
/// ```
66-
pub fn get_video_minimize_on_focus_lost() -> bool {
67-
match get(VIDEO_MINIMIZE_ON_FOCUS_LOST) {
66+
pub fn get_video_minimize_on_focus_loss() -> bool {
67+
match get(VIDEO_MINIMIZE_ON_FOCUS_LOSS) {
6868
Some(value) => match &*value {
6969
"1" => true,
7070
_ => false,

0 commit comments

Comments
 (0)