Files
RedScarfEngine/red_scarf_engine/src/main.c
T
everyonecancode 5ad0ac7fed Fix termination errors
Cleanup for objects destruction and process termination.
This is still work in progress, I don't like the way it's
handled right now.
2025-08-29 10:02:14 +02:00

31 lines
721 B
C

#include <SDL3/SDL_init.h>
#include "graphics/rse_graphics.h"
#include "utilities/errors_common.h"
#include "utilities/logger.h"
#include "SDL3/SDL_thread.h"
int main(int argc, char** argv)
{
rse_err_t status = RSE_ERROR_NO_ERROR;
struct rse_graphics_context_t* context = NULL;
SDL_Thread* graphics_task = NULL;
(void)argc;
(void)argv;
STATUS_CHECK(rse_graphics_init(&context));
rse_graphics_test_function(context);
graphics_task = SDL_CreateThread(rse_graphics_run, "graphics_task", (void*) context);
if (NULL == graphics_task) {
LOGE(_("Failed to create graphics task"));
exit(1);
}
SDL_WaitThread(graphics_task, NULL);
SDL_Quit();
return 0;
}