Revert "chore(deps): update guardpp"

This reverts commit d5964629
This commit is contained in:
D3SOX 2022-05-18 20:12:13 +02:00
parent 0f37a36b10
commit 34626be565
No known key found for this signature in database
GPG Key ID: 39EC1673FC37B048
3 changed files with 5 additions and 5 deletions

View File

@ -94,7 +94,7 @@ set(HTTPLIB_REQUIRE_OPENSSL ON)
add_subdirectory(lib/cpp-httplib EXCLUDE_FROM_ALL)
target_include_directories(soundux SYSTEM PRIVATE "lib/cpp-httplib")
target_link_libraries(soundux PRIVATE webview nfd tiny-process-library tray guardpp httplib lockpp libremidi)
target_link_libraries(soundux PRIVATE webview nfd tiny-process-library tray guard httplib lockpp libremidi)
if (${EMBED_PATH} STREQUAL "OFF")
message("Web-content will not be embedded")

View File

@ -37,7 +37,7 @@ namespace Soundux
inline std::unique_ptr<Objects::Window> gGui;
inline std::shared_ptr<Objects::Hotkeys> gHotKeys;
inline std::shared_ptr<guardpp::guard> gGuard;
inline std::shared_ptr<Instance::Guard> gGuard;
/* Allows for fast & easy sound access, is populated on start up */
inline sxl::var_guard<std::map<std::uint32_t, std::reference_wrapper<Objects::Sound>>> gSounds;

View File

@ -56,16 +56,16 @@ int main(int argc, char **arguments)
}
backward::SignalHandling crashHandler;
gGuard = std::make_shared<guardpp::guard>("soundux-guard");
gGuard = std::make_shared<Instance::Guard>("soundux-guard");
if (std::find(args.begin(), args.end(), "--reset-mutex") != args.end())
{
gGuard->reset();
gGuard.reset();
gGuard = std::make_shared<guardpp::guard>("soundux-guard");
gGuard = std::make_shared<Instance::Guard>("soundux-guard");
}
if (gGuard->other_instance())
if (gGuard->isAnotherRunning())
{
Fancy::fancy.logTime().failure() << "Another Instance is already running!" << std::endl;
return 1;