made it more stupider

This commit is contained in:
Lauchmelder 2022-08-31 23:14:57 +02:00
parent cf238d7a1e
commit d40fc7588b

View file

@ -1,7 +1,7 @@
mod nes; mod nes;
mod renderer; mod renderer;
use std::ffi::{c_void, CStr}; use std::ffi::{CStr};
use glfw::{Context}; use glfw::{Context};
use nes::nes::NES; use nes::nes::NES;
@ -23,8 +23,9 @@ fn main() {
unsafe unsafe
{ {
res = context::init_opengl( res = context::init_opengl(
&mut glfw as *mut _ as *mut c_void, &mut glfw as *mut _ as *mut _,
|glfw, name| (&mut *(glfw as *mut glfw::Glfw)).get_proc_address_raw(CStr::from_ptr(name).to_str().unwrap())); |glfw, name| (&mut *(glfw as *mut glfw::Glfw)).get_proc_address_raw(CStr::from_ptr(name).to_str().unwrap())
);
} }
if res != 0 { if res != 0 {