mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
wallpaper: Add pledge promises
This commit is contained in:
parent
85b133d47f
commit
2cdc7c4ca0
Notes:
sideshowbarker
2024-07-17 08:28:39 +09:00
Author: https://github.com/networkException
Commit: 2cdc7c4ca0
Pull-request: https://github.com/SerenityOS/serenity/pull/14755
Reviewed-by: https://github.com/linusg ✅
1 changed files with 5 additions and 0 deletions
|
@ -10,12 +10,15 @@
|
|||
#include <AK/StringBuilder.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/DirIterator.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Desktop.h>
|
||||
#include <LibMain/Main.h>
|
||||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath unix sendfd recvfd"));
|
||||
|
||||
bool show_all = false;
|
||||
bool show_current = false;
|
||||
bool set_random = false;
|
||||
|
@ -30,6 +33,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
TRY(Core::System::pledge("stdio rpath unix sendfd"));
|
||||
|
||||
if (show_all) {
|
||||
Core::DirIterator wallpapers_directory_iterator("/res/wallpapers", Core::DirIterator::SkipDots);
|
||||
if (wallpapers_directory_iterator.has_error())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue