Skip to content

Commit

Permalink
Fix mpv crash under wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
xfangfang committed Nov 25, 2023
1 parent 129b6b6 commit 73016ae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions wiliwili/source/utils/config_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,11 +708,6 @@ void ProgramConfig::save() {
}

void ProgramConfig::init() {
brls::Logger::info("wiliwili {}", APPVersion::instance().git_tag);

// Needed for MPV
setlocale(LC_NUMERIC, "C");

// Set min_threads and max_threads of http thread pool
curl_global_init(CURL_GLOBAL_DEFAULT);
cpr::async::startup(THREAD_POOL_MIN_THREAD_NUM, THREAD_POOL_MAX_THREAD_NUM,
Expand Down
1 change: 1 addition & 0 deletions wiliwili/source/view/mpv_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ MPVCore::MPVCore() {
}

void MPVCore::init() {
setlocale(LC_NUMERIC, "C");
this->mpv = mpv_create();
if (!mpv) {
brls::fatal("Error Create mpv Handle");
Expand Down

0 comments on commit 73016ae

Please sign in to comment.