Implement system_can_exit

This commit is contained in:
Xavier Del Campo Romero 2022-07-07 02:44:08 +02:00
parent 251bd41c44
commit c9dee333fe
3 changed files with 13 additions and 0 deletions

View File

@ -1,6 +1,8 @@
#ifndef SYSTEM_H
#define SYSTEM_H
#include <stdbool.h>
#ifdef __cplusplus
extern "C"
{
@ -9,6 +11,7 @@ extern "C"
int system_init(void);
void system_deinit(void);
void system_loop(void);
bool system_can_exit(void);
#ifdef __cplusplus
}

View File

@ -6,6 +6,11 @@
volatile bool vblank_set;
bool system_can_exit(void)
{
return false;
}
static void vblank(void *const arg)
{
vblank_set = true;

View File

@ -5,6 +5,11 @@
#include <stdio.h>
#include <stdlib.h>
bool system_can_exit(void)
{
return true;
}
void system_loop(void)
{
SDL_PumpEvents();