aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-06-08 22:11:44 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-06-08 22:11:44 +0100
commitcb6d24b838632e1269a5e4bb4e83425061f5d853 (patch)
treefd58b5d7ceddb9bf0fd3f3058b71d53a03ebd32b /src/main.c
parentc5e314048afd1ba3f87204b0655af70f95ae7ab1 (diff)
downloadgold-mine-run-cb6d24b838632e1269a5e4bb4e83425061f5d853.tar.gz
gold-mine-run-cb6d24b838632e1269a5e4bb4e83425061f5d853.zip
Detect the VGA card before setting mode 0x13
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index c0e7dc3..672a478 100644
--- a/src/main.c
+++ b/src/main.c
@@ -17,7 +17,11 @@ int main(int argc, char *argv[])
atexit(keyb_free);
/* set VGA 320x200, 256 col */
- set_mode(0x13);
+ if (!set_mode(0x13))
+ {
+ fprintf(stderr, "ERROR: failed to init the VGA card\n");
+ return 1;
+ }
set_palette(binary_palette_start);