mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:27:34 +00:00
Chess: Perform pledges earlier
This commit is contained in:
parent
fd51a3cf15
commit
4332b35798
1 changed files with 10 additions and 4 deletions
|
@ -20,11 +20,12 @@
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
auto app = GUI::Application::construct(argc, argv);
|
if (pledge("stdio rpath wpath cpath recvfd sendfd thread proc exec unix", nullptr) < 0) {
|
||||||
auto app_icon = GUI::Icon::default_icon("app-chess");
|
perror("pledge");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
auto window = GUI::Window::construct();
|
auto app = GUI::Application::construct(argc, argv);
|
||||||
auto& widget = window->set_main_widget<ChessWidget>();
|
|
||||||
|
|
||||||
Config::pledge_domains("Chess");
|
Config::pledge_domains("Chess");
|
||||||
|
|
||||||
|
@ -33,6 +34,11 @@ int main(int argc, char** argv)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto app_icon = GUI::Icon::default_icon("app-chess");
|
||||||
|
|
||||||
|
auto window = GUI::Window::construct();
|
||||||
|
auto& widget = window->set_main_widget<ChessWidget>();
|
||||||
|
|
||||||
if (unveil("/res", "r") < 0) {
|
if (unveil("/res", "r") < 0) {
|
||||||
perror("unveil");
|
perror("unveil");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue