parent
172d10d7cb
commit
323e8cf1f0
@ -267,6 +267,8 @@ async fn main() -> std::io::Result<()> {
|
||||
args.use_dinput,
|
||||
args.deadzone.unwrap_or(ui::input::DEADZONE_DEFAULT),
|
||||
);
|
||||
|
||||
ui::sdl_close();
|
||||
return Ok(());
|
||||
}
|
||||
if args.list_controllers {
|
||||
@ -288,7 +290,6 @@ async fn main() -> std::io::Result<()> {
|
||||
ui::input::bind_input_profile(&mut config, profile, port);
|
||||
}
|
||||
}
|
||||
unsafe { sdl3_sys::init::SDL_Quit() };
|
||||
} else {
|
||||
#[cfg(feature = "gui")]
|
||||
{
|
||||
@ -298,5 +299,6 @@ async fn main() -> std::io::Result<()> {
|
||||
}
|
||||
}
|
||||
|
||||
ui::sdl_close();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -108,6 +108,13 @@ pub fn ttf_init() {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn sdl_close() {
|
||||
unsafe {
|
||||
sdl3_ttf_sys::ttf::TTF_Quit();
|
||||
sdl3_sys::init::SDL_Quit();
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_dirs() -> Dirs {
|
||||
let exe_path = std::env::current_exe().unwrap();
|
||||
let portable_dir = exe_path.parent();
|
||||
|
||||
@ -515,7 +515,6 @@ pub fn app_window() {
|
||||
ui::cheats::cheats_window(&app);
|
||||
app.run().unwrap();
|
||||
save_settings(&app);
|
||||
unsafe { sdl3_sys::init::SDL_Quit() };
|
||||
}
|
||||
|
||||
pub fn run_rom(
|
||||
|
||||
@ -608,8 +608,6 @@ fn close_input_profile_window(
|
||||
sdl3_ttf_sys::ttf::TTF_DestroyRendererTextEngine(text_engine);
|
||||
sdl3_sys::render::SDL_DestroyRenderer(renderer);
|
||||
sdl3_sys::video::SDL_DestroyWindow(window);
|
||||
sdl3_ttf_sys::ttf::TTF_Quit();
|
||||
sdl3_sys::init::SDL_Quit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -150,8 +150,6 @@ pub fn close(ui: &ui::Ui) {
|
||||
unsafe {
|
||||
rdp_close();
|
||||
sdl3_sys::video::SDL_DestroyWindow(ui.video.window);
|
||||
sdl3_ttf_sys::ttf::TTF_Quit();
|
||||
sdl3_sys::init::SDL_Quit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user