diff options
Diffstat (limited to 'src/system')
| -rw-r--r-- | src/system/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | src/system/inc/init.h | 15 | ||||
| -rw-r--r-- | src/system/src/init.c | 17 |
3 files changed, 35 insertions, 0 deletions
diff --git a/src/system/CMakeLists.txt b/src/system/CMakeLists.txt new file mode 100644 index 0000000..5ff8971 --- /dev/null +++ b/src/system/CMakeLists.txt @@ -0,0 +1,3 @@ +add_library(init "src/init.c") +target_include_directories(init PUBLIC "inc") +target_link_libraries(init PUBLIC gfx) diff --git a/src/system/inc/init.h b/src/system/inc/init.h new file mode 100644 index 0000000..0560efe --- /dev/null +++ b/src/system/inc/init.h @@ -0,0 +1,15 @@ +#ifndef INIT_H +#define INIT_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +int system_init(void); + +#ifdef __cplusplus +} +#endif + +#endif /* INIT_H */ diff --git a/src/system/src/init.c b/src/system/src/init.c new file mode 100644 index 0000000..97f960a --- /dev/null +++ b/src/system/src/init.c @@ -0,0 +1,17 @@ +#include <gfx.h> +#include <psx.h> + +static void vblank(void *const arg) +{ +} + +int system_init(void) +{ + PSX_InitEx(0); + SetVBlankHandler(vblank); + + if (gfx_init()) + return -1; + + return 0; +} |
