summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Applications/Piano/CMakeLists.txt2
-rw-r--r--Userland/Applications/Piano/main.cpp11
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 <LibGUI/Menubar.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/Window.h>
+#include <LibMain/Main.h>
+#include <LibSystem/Wrappers.h>
-int main(int argc, char** argv)
+ErrorOr<int> 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;