Skip to content

Commit

Permalink
Fallback to software rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuroXina committed Feb 12, 2024
1 parent 9616190 commit 9edf1e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/video/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ impl<'window> Renderer<'window> {
/// Constructs a renderer from the window.
#[must_use]
pub fn new(window: &'window Window) -> Self {
let raw = unsafe { bind::SDL_CreateRenderer(window.as_ptr(), -1, 0) };
let raw =
unsafe { bind::SDL_CreateRenderer(window.as_ptr(), -1, bind::SDL_RENDERER_SOFTWARE) };
NonNull::new(raw).map_or_else(
|| Sdl::error_then_panic("Sdl renderer"),
|renderer| Self { renderer, window },
Expand Down

0 comments on commit 9edf1e0

Please sign in to comment.