[Emulator] Delegate to UI thread instead of assert
This commit is contained in:
@@ -1445,7 +1445,15 @@ X_STATUS Emulator::CompleteLaunch(const std::filesystem::path& path,
|
|||||||
const std::string_view module_path) {
|
const std::string_view module_path) {
|
||||||
// Making changes to the UI (setting the icon) and executing game config
|
// Making changes to the UI (setting the icon) and executing game config
|
||||||
// load callbacks which expect to be called from the UI thread.
|
// load callbacks which expect to be called from the UI thread.
|
||||||
assert_true(display_window_->app_context().IsInUIThread());
|
// If not on UI thread, dispatch to it synchronously.
|
||||||
|
if (!display_window_->app_context().IsInUIThread()) {
|
||||||
|
X_STATUS result = X_STATUS_UNSUCCESSFUL;
|
||||||
|
display_window_->app_context().CallInUIThreadSynchronous(
|
||||||
|
[this, &path, &module_path, &result]() {
|
||||||
|
result = CompleteLaunch(path, module_path);
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
// Setup NullDevices for raw HDD partition accesses
|
// Setup NullDevices for raw HDD partition accesses
|
||||||
// Cache/STFC code baked into games tries reading/writing to these
|
// Cache/STFC code baked into games tries reading/writing to these
|
||||||
|
|||||||
Reference in New Issue
Block a user