Moved UI resource destruction to RT64 deinit hook, temporarily disabled shader cache as it's out of date

This commit is contained in:
Mr-Wiseguy 2024-05-01 04:25:22 -04:00
parent 11012cdfc6
commit 956db3366f
3 changed files with 12 additions and 12 deletions

@ -1 +1 @@
Subproject commit 92ae002acf9c344fed5575d6def79fb6a8207181 Subproject commit 611d26a7c8254d15f8aa9250969e3357feea5e64

View File

@ -1379,7 +1379,11 @@ void draw_hook(RT64::RenderCommandList* command_list, RT64::RenderFramebuffer* s
} }
void deinit_hook() { void deinit_hook() {
std::lock_guard lock {ui_context_mutex};
Rml::Debugger::Shutdown();
Rml::Shutdown();
ui_context->rml.unload();
ui_context.reset();
} }
void set_rt64_hooks() { void set_rt64_hooks() {
@ -1398,11 +1402,6 @@ void recomp::set_config_submenu(recomp::ConfigSubmenu submenu) {
} }
void recomp::destroy_ui() { void recomp::destroy_ui() {
std::lock_guard lock {ui_context_mutex};
Rml::Debugger::Shutdown();
Rml::Shutdown();
ui_context->rml.unload();
ui_context.reset();
} }
recomp::Menu recomp::get_current_menu() { recomp::Menu recomp::get_current_menu() {

View File

@ -179,7 +179,7 @@ ultramodern::RT64Context::RT64Context(uint8_t* rdram, ultramodern::WindowHandle
#ifdef _WIN32 #ifdef _WIN32
thread_id = window_handle.thread_id; thread_id = window_handle.thread_id;
#endif #endif
if (!app->setup(thread_id)) { if (app->setup(thread_id) != RT64::Application::SetupResult::Success) {
app = nullptr; app = nullptr;
return; return;
} }
@ -249,10 +249,11 @@ void ultramodern::RT64Context::load_shader_cache(std::span<const char> cache_bin
// TODO figure out how to avoid a copy here. // TODO figure out how to avoid a copy here.
std::istringstream cache_stream{std::string{cache_binary.data(), cache_binary.size()}}; std::istringstream cache_stream{std::string{cache_binary.data(), cache_binary.size()}};
if (!app->rasterShaderCache->loadOfflineList(cache_stream)) { // TODO update shader cache
printf("Failed to preload shader cache!\n"); //if (!app->rasterShaderCache->loadOfflineList(cache_stream)) {
assert(false); // printf("Failed to preload shader cache!\n");
} // assert(false);
//}
} }
RT64::UserConfiguration::Antialiasing ultramodern::RT64MaxMSAA() { RT64::UserConfiguration::Antialiasing ultramodern::RT64MaxMSAA() {