about summary refs log tree commit diff stats
path: root/crates/libmpv2/examples/opengl.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-03-21 19:35:36 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-03-21 19:35:36 +0100
commit8be717167ed77f5a1021fa0825b386674c5c1a39 (patch)
tree23651b5bfb9e52ec8138e382e12bf8f072a2bbb9 /crates/libmpv2/examples/opengl.rs
parentbuild(treewide): Update (diff)
downloadyt-8be717167ed77f5a1021fa0825b386674c5c1a39.zip
chore(treewide): Migrate to rust edition 2024
Even though the diff in the libmpv2 crate is quite big, it really only
added `unsafe` blocks to the `unsafe` functions.
Diffstat (limited to 'crates/libmpv2/examples/opengl.rs')
-rw-r--r--crates/libmpv2/examples/opengl.rs17
1 files changed, 10 insertions, 7 deletions
diff --git a/crates/libmpv2/examples/opengl.rs b/crates/libmpv2/examples/opengl.rs
index 8eb9647..9f595aa 100644
--- a/crates/libmpv2/examples/opengl.rs
+++ b/crates/libmpv2/examples/opengl.rs
@@ -38,13 +38,16 @@ fn main() {
         Ok(())
     })
     .unwrap();
-    let mut render_context = RenderContext::new(unsafe { mpv.ctx.as_mut() }, vec![
-        RenderParam::ApiType(RenderParamApiType::OpenGl),
-        RenderParam::InitParams(OpenGLInitParams {
-            get_proc_address,
-            ctx: video,
-        }),
-    ])
+    let mut render_context = RenderContext::new(
+        unsafe { mpv.ctx.as_mut() },
+        vec![
+            RenderParam::ApiType(RenderParamApiType::OpenGl),
+            RenderParam::InitParams(OpenGLInitParams {
+                get_proc_address,
+                ctx: video,
+            }),
+        ],
+    )
     .expect("Failed creating render context");
 
     event_subsystem