Skip to content

Commit

Permalink
fix: Fallback to software rendering (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuroXina authored Feb 12, 2024
1 parent 257efcc commit 82fd7e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/video/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ 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 as u32)
};
NonNull::new(raw).map_or_else(
|| Sdl::error_then_panic("Sdl renderer"),
|renderer| Self { renderer, window },
Expand Down

0 comments on commit 82fd7e5

Please sign in to comment.