Merge pull request #152 from seemk/get_rt_fix

Render target + Travis fix
This commit is contained in:
Tony Aldridge
2014-07-25 13:17:36 +01:00
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -3,6 +3,7 @@ before_install:
- tar xf rust-nightly-x86_64-unknown-linux-gnu.tar.gz
install:
- sudo ./rust-nightly-x86_64-unknown-linux-gnu/install.sh
- export LD_LIBRARY_PATH="/usr/local/lib/:$LD_LIBRARY_PATH"
- wget http://www.libsdl.org/release/SDL2-2.0.0.tar.gz
- tar -zxvf SDL2-2.0.0.tar.gz
- cd SDL2-2.0.0
+3 -3
View File
@@ -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
})