mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
Games: Use pledge()
This commit is contained in:
parent
d1839ae0c9
commit
df7b81bdf5
2 changed files with 23 additions and 0 deletions
|
@ -10,11 +10,23 @@
|
|||
#include <LibGUI/GMenu.h>
|
||||
#include <LibGUI/GMenuBar.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (pledge("stdio rpath wpath cpath shared_buffer unix fattr", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
GApplication app(argc, argv);
|
||||
|
||||
if (pledge("stdio rpath wpath cpath shared_buffer", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
auto window = GWindow::construct();
|
||||
window->set_resizable(false);
|
||||
window->set_title("Minesweeper");
|
||||
|
|
|
@ -8,11 +8,22 @@
|
|||
#include <LibGUI/GMenu.h>
|
||||
#include <LibGUI/GMenuBar.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (pledge("stdio rpath cpath shared_buffer unix fattr", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
GApplication app(argc, argv);
|
||||
|
||||
if (pledge("stdio rpath shared_buffer", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto window = GWindow::construct();
|
||||
|
||||
window->set_double_buffering_enabled(false);
|
||||
|
|
Loading…
Add table
Reference in a new issue