mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:57:42 +00:00
Games: Use pledge and unveil
This commit is contained in:
parent
9faca895d3
commit
9f8a8e07c2
5 changed files with 73 additions and 0 deletions
|
@ -53,6 +53,23 @@ int main(int argc, char** argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (unveil("/res", "r") < 0) {
|
||||
perror("unveil");
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto config = Core::ConfigFile::get_for_app("Minesweeper");
|
||||
|
||||
if (unveil(config->file_name().characters(), "crw") < 0) {
|
||||
perror("unveil");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (unveil(nullptr, nullptr) < 0) {
|
||||
perror("unveil");
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto app_icon = GUI::Icon::default_icon("app-minesweeper");
|
||||
|
||||
auto window = GUI::Window::construct();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue