mirror of
https://github.com/encounter/rust-sdl2.git
synced 2026-07-10 21:18:41 -07:00
Renamed hint functions to increase usability
get_hint is now get set_hint is now set set_hint_with_priority is now set_with_priority Allowing sdl2::hint::get()
This commit is contained in:
+3
-3
@@ -8,7 +8,7 @@ pub enum Hint {
|
||||
Override
|
||||
}
|
||||
|
||||
pub fn set_hint(name: &str, value: &str) -> bool{
|
||||
pub fn set(name: &str, value: &str) -> bool{
|
||||
let name = CString::new(name).unwrap();
|
||||
let value = CString::new(value).unwrap();
|
||||
unsafe {
|
||||
@@ -16,7 +16,7 @@ pub fn set_hint(name: &str, value: &str) -> bool{
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_hint(name: &str) -> Option<String> {
|
||||
pub fn get(name: &str) -> Option<String> {
|
||||
use std::str;
|
||||
|
||||
let name = CString::new(name).unwrap();
|
||||
@@ -32,7 +32,7 @@ pub fn get_hint(name: &str) -> Option<String> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_hint_with_priority(name: &str, value: &str, priority: Hint) -> bool {
|
||||
pub fn set_with_priority(name: &str, value: &str, priority: Hint) -> bool {
|
||||
let name = CString::new(name).unwrap();
|
||||
let value = CString::new(value).unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user