diff options
author | 2025-05-22 15:35:56 +0200 | |
---|---|---|
committer | 2025-05-22 15:35:56 +0200 | |
commit | 89527a169b9ea38ca270d69c6ebe9ce383289f48 (patch) | |
tree | fc84795dbff07aed00c38295de766ee27702ca4d /src/main/engine/ui/x11/ui.c | |
parent | 398b3160789ab1f871f92d69d05ad4e5ffb8c54a (diff) | |
download | tris-89527a169b9ea38ca270d69c6ebe9ce383289f48.tar.gz tris-89527a169b9ea38ca270d69c6ebe9ce383289f48.zip |
Rename ui_init in ui_new
Diffstat (limited to 'src/main/engine/ui/x11/ui.c')
-rw-r--r-- | src/main/engine/ui/x11/ui.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main/engine/ui/x11/ui.c b/src/main/engine/ui/x11/ui.c index 2501f5c..3c302b1 100644 --- a/src/main/engine/ui/x11/ui.c +++ b/src/main/engine/ui/x11/ui.c @@ -114,16 +114,22 @@ ui_set_title(const char *title) XStoreName(display, window, title); } +/* + * This is the function used to init a UI. + */ UI * -ui_init(int width, int height) +ui_new(int width, int height) { init_log(); + /* Inizilize the UI */ UI *ui = malloc(sizeof(UI)); if (ui == NULL) { - log_error(log, "Error allocating UI"); - exit(1); + log_error(log, "Error allocating the UI"); + exit(EXIT_FAILURE); } + ui->width = width; + ui->height = height; display = ui_open_display(); @@ -140,9 +146,6 @@ ui_init(int width, int height) exit(1); } - ui->width = width; - ui->height = height; - return ui; } |