aboutsummaryrefslogtreecommitdiff
path: root/examples/io/system573/main.c
diff options
context:
space:
mode:
authorJohn "Lameguy" Wilbert Villamor <lameguy64@gmail.com>2022-10-19 17:57:06 +0800
committerGitHub <noreply@github.com>2022-10-19 17:57:06 +0800
commite08a3d9366f8ca14a76b3dd569dac1fb9f569748 (patch)
tree33654513b0b184c27f8035dbc405640fcbeb44ab /examples/io/system573/main.c
parentc4a2533d21dfd05cde841ea48c67b05e0e6a853f (diff)
parent9b2ffc6078a850b7d354855cca7622090b41f30c (diff)
downloadpsn00bsdk-e08a3d9366f8ca14a76b3dd569dac1fb9f569748.tar.gz
Merge pull request #59 from spicyjpeg/psxmdec
IRQ handler fix, .STR playback example, multiple library builds (v0.21)
Diffstat (limited to 'examples/io/system573/main.c')
-rw-r--r--examples/io/system573/main.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/examples/io/system573/main.c b/examples/io/system573/main.c
index 3404ee4..39ddb64 100644
--- a/examples/io/system573/main.c
+++ b/examples/io/system573/main.c
@@ -83,17 +83,17 @@ const char *const IO_BOARD_TYPES[] = {
#define BGCOLOR_B 0
typedef struct {
- DISPENV disp;
- DRAWENV draw;
-} DB;
+ DISPENV disp;
+ DRAWENV draw;
+} Framebuffer;
typedef struct {
- DB db[2];
- uint32_t db_active;
-} CONTEXT;
+ Framebuffer db[2];
+ int db_active;
+} RenderContext;
-void init_context(CONTEXT *ctx) {
- DB *db;
+void init_context(RenderContext *ctx) {
+ Framebuffer *db;
ResetGraph(0);
ctx->db_active = 0;
@@ -120,8 +120,8 @@ void init_context(CONTEXT *ctx) {
FntOpen(8, 16, 304, 208, 2, 512);
}
-void display(CONTEXT *ctx) {
- DB *db;
+void display(RenderContext *ctx) {
+ Framebuffer *db;
DrawSync(0);
VSync(0);
@@ -135,7 +135,7 @@ void display(CONTEXT *ctx) {
/* Main */
-static CONTEXT ctx;
+static RenderContext ctx;
#define SHOW_STATUS(...) { FntPrint(-1, __VA_ARGS__); FntFlush(-1); display(&ctx); }
#define SHOW_ERROR(...) { SHOW_STATUS(__VA_ARGS__); while (1) __asm__("nop"); }