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

fix: python3 support

parent e249922a
No related branches found
No related tags found
No related merge requests found
Pipeline #4784 passed
...@@ -178,14 +178,14 @@ impl GameBoy { ...@@ -178,14 +178,14 @@ impl GameBoy {
} }
pub fn save_state(&mut self, py: Python) -> PyResult<PyObject> { pub fn save_state(&mut self, py: Python) -> PyResult<PyObject> {
match StateManager::save(&mut self.system, None) { match StateManager::save(&mut self.system, None, None) {
Ok(data) => Ok(PyBytes::new(py, &data).into()), Ok(data) => Ok(PyBytes::new(py, &data).into()),
Err(e) => Err(PyErr::new::<PyException, _>(e)), Err(e) => Err(PyErr::new::<PyException, _>(e)),
} }
} }
pub fn load_state(&mut self, data: &[u8]) -> PyResult<()> { pub fn load_state(&mut self, data: &[u8]) -> PyResult<()> {
StateManager::load(data, &mut self.system, None).map_err(PyErr::new::<PyException, _>) StateManager::load(data, &mut self.system, None, None).map_err(PyErr::new::<PyException, _>)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment