Skip to content
Snippets Groups Projects
Verified Commit cb654bf8 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

chore: addr_of usage for static variables

parent 9feb569a
No related branches found
No related tags found
No related merge requests found
Pipeline #4124 passed
......@@ -30,7 +30,7 @@ use std::{
ffi::CStr,
fmt::{self, Display, Formatter},
os::raw::{c_char, c_float, c_uint, c_void},
ptr,
ptr::{self, addr_of},
slice::from_raw_parts,
};
......@@ -295,7 +295,7 @@ pub extern "C" fn retro_run() {
unsafe {
environment_cb(
RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE,
&UPDATED as *const _ as *const c_void,
addr_of!(UPDATED) as *const _ as *const c_void,
);
if UPDATED {
update_vars();
......@@ -544,7 +544,7 @@ unsafe fn update_palette() {
let environment_cb = ENVIRONMENT_CALLBACK.as_ref().unwrap();
environment_cb(
RETRO_ENVIRONMENT_GET_VARIABLE,
&VARIABLE as *const _ as *const c_void,
addr_of!(VARIABLE) as *const _ as *const c_void,
);
if VARIABLE.value.is_null() {
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment