From 41b80f3d85c972e5c1a687707bfe48db8cc15ac2 Mon Sep 17 00:00:00 2001 From: Pascal Puffke Date: Mon, 22 Nov 2021 23:24:55 +0100 Subject: [PATCH] Piano: Port to LibMain --- Userland/Applications/Piano/CMakeLists.txt | 2 +- Userland/Applications/Piano/main.cpp | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Userland/Applications/Piano/CMakeLists.txt b/Userland/Applications/Piano/CMakeLists.txt index 19717985e8..60a49f7731 100644 --- a/Userland/Applications/Piano/CMakeLists.txt +++ b/Userland/Applications/Piano/CMakeLists.txt @@ -21,4 +21,4 @@ set(SOURCES ) serenity_app(Piano ICON app-piano) -target_link_libraries(Piano LibAudio LibDSP LibGUI) +target_link_libraries(Piano LibAudio LibDSP LibGUI LibMain) diff --git a/Userland/Applications/Piano/main.cpp b/Userland/Applications/Piano/main.cpp index fec6390aa9..53f322e393 100644 --- a/Userland/Applications/Piano/main.cpp +++ b/Userland/Applications/Piano/main.cpp @@ -22,15 +22,14 @@ #include #include #include +#include +#include -int main(int argc, char** argv) +ErrorOr serenity_main(Main::Arguments arguments) { - if (pledge("stdio thread rpath cpath wpath recvfd sendfd unix", nullptr) < 0) { - perror("pledge"); - return 1; - } + TRY(System::pledge("stdio thread rpath cpath wpath recvfd sendfd unix", nullptr)); - auto app = GUI::Application::construct(argc, argv); + auto app = GUI::Application::construct(arguments.argc, arguments.argv); TrackManager track_manager;