mirror of
https://github.com/encounter/rust-sdl2.git
synced 2026-07-10 21:18:41 -07:00
get_render_target fix
This commit is contained in:
+3
-3
@@ -370,13 +370,13 @@ impl<S> Renderer<S> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_render_target(&self) -> SdlResult<Texture> {
|
||||
pub fn get_render_target(&self) -> Option<Texture> {
|
||||
let raw = unsafe { ll::SDL_GetRenderTarget(self.raw) };
|
||||
|
||||
if raw == ptr::null() {
|
||||
Err(get_error())
|
||||
None
|
||||
} else {
|
||||
Ok(Texture{
|
||||
Some(Texture{
|
||||
raw: raw,
|
||||
owned: false
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user