mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:17:34 +00: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/GMenu.h>
|
||||||
#include <LibGUI/GMenuBar.h>
|
#include <LibGUI/GMenuBar.h>
|
||||||
#include <LibGUI/GWindow.h>
|
#include <LibGUI/GWindow.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
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);
|
GApplication app(argc, argv);
|
||||||
|
|
||||||
|
if (pledge("stdio rpath wpath cpath shared_buffer", nullptr) < 0) {
|
||||||
|
perror("pledge");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
auto window = GWindow::construct();
|
auto window = GWindow::construct();
|
||||||
window->set_resizable(false);
|
window->set_resizable(false);
|
||||||
window->set_title("Minesweeper");
|
window->set_title("Minesweeper");
|
||||||
|
|
|
@ -8,11 +8,22 @@
|
||||||
#include <LibGUI/GMenu.h>
|
#include <LibGUI/GMenu.h>
|
||||||
#include <LibGUI/GMenuBar.h>
|
#include <LibGUI/GMenuBar.h>
|
||||||
#include <LibGUI/GWindow.h>
|
#include <LibGUI/GWindow.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
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);
|
GApplication app(argc, argv);
|
||||||
|
|
||||||
|
if (pledge("stdio rpath shared_buffer", nullptr) < 0) {
|
||||||
|
perror("pledge");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
auto window = GWindow::construct();
|
auto window = GWindow::construct();
|
||||||
|
|
||||||
window->set_double_buffering_enabled(false);
|
window->set_double_buffering_enabled(false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue