mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-05 00:42:48 +00:00
pthread: Bump minimum stack size to fix cubeb crash.
This commit is contained in:
parent
a7f8aae2be
commit
a4ef7771df
1
.gitmodules
vendored
1
.gitmodules
vendored
@ -122,3 +122,4 @@
|
||||
[submodule "externals/cubeb"]
|
||||
path = externals/cubeb
|
||||
url = https://github.com/mozilla/cubeb
|
||||
shallow = true
|
||||
|
@ -137,7 +137,6 @@ private:
|
||||
};
|
||||
|
||||
CubebAudioOut::CubebAudioOut() {
|
||||
cubeb_set_log_callback(CUBEB_LOG_DISABLED, nullptr);
|
||||
if (const auto ret = cubeb_init(&ctx, "shadPS4", nullptr); ret != CUBEB_OK) {
|
||||
LOG_CRITICAL(Lib_AudioOut, "Failed to create cubeb context: {}", ret);
|
||||
}
|
||||
|
@ -244,8 +244,8 @@ int PS4_SYSV_ABI posix_pthread_create_name_np(PthreadT* thread, const PthreadAtt
|
||||
new_thread->tid = ++TidCounter;
|
||||
|
||||
if (new_thread->attr.stackaddr_attr == 0) {
|
||||
/* Enforce minimum stack size of 64 KB */
|
||||
static constexpr size_t MinimumStack = 64_KB;
|
||||
/* Enforce minimum stack size of 128 KB */
|
||||
static constexpr size_t MinimumStack = 128_KB;
|
||||
auto& stacksize = new_thread->attr.stacksize_attr;
|
||||
stacksize = std::max(stacksize, MinimumStack);
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ void Emulator::LoadSystemModules(const std::filesystem::path& file, std::string
|
||||
LOG_INFO(Loader, "No HLE available for {} module", module_name);
|
||||
}
|
||||
}
|
||||
if (std::filesystem::exists(sys_module_path / game_serial)) {
|
||||
if (!game_serial.empty() && std::filesystem::exists(sys_module_path / game_serial)) {
|
||||
for (const auto& entry :
|
||||
std::filesystem::directory_iterator(sys_module_path / game_serial)) {
|
||||
LOG_INFO(Loader, "Loading {} from game serial file {}", entry.path().string(),
|
||||
|
Loading…
Reference in New Issue
Block a user