Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
chenmozhijin committed Aug 15, 2024
1 parent 6058736 commit a5cac2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using json = nlohmann::json;

DECLARE_COMPONENT_VERSION(
"LDDCDesktopLyrics",
"LDDC Desktop Lyrics",
"0.0.1",
"Foobar2000 plugin for displaying lyrics on the desktop."
);
Expand Down Expand Up @@ -79,13 +79,13 @@ class LDDCDesktopLyricsInitQuit : public initquit {
}

void on_quit() override {
play_callback_manager::get()->unregister_callback(play_callback_impl);
if (lddc) {
lddc->shutdown();
delete lddc;
lddc = nullptr;
}
if (play_callback_impl) {
play_callback_manager::get()->unregister_callback(play_callback_impl);
delete play_callback_impl;
play_callback_impl = nullptr;
}
Expand Down Expand Up @@ -162,7 +162,7 @@ class LDDCDesktopLyricsInitQuit : public initquit {
siStartInfo.dwFlags |= STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
siStartInfo.wShowWindow = SW_HIDE;

std::string cmdline = "cmd /c " + cmd;
std::string cmdline = "cmd /c \"" + cmd + "\"";
std::wstring cmdline_w = string_to_wstring(cmdline);

if (!CreateProcess(NULL, const_cast<LPWSTR>(cmdline_w.c_str()), NULL, NULL, TRUE, 0, NULL, NULL, &siStartInfo, &piProcInfo)) {
Expand Down

0 comments on commit a5cac2f

Please sign in to comment.