uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 297046ec145263a9620652c80da23f5f97f19669
parent 5582816943c1ce13364d578758e91df543ae547c
Author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
Date:   Sun, 24 Oct 2021 21:31:25 +0200

check SDL_GetCurrentDisplayMode return code, keep zoom at 1 if it failed

Diffstat:
Msrc/uxnemu.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/uxnemu.c b/src/uxnemu.c @@ -588,8 +588,8 @@ main(int argc, char **argv) /* unused */ uxn_port(&u, 0xf, nil_talk); /* set default zoom */ - SDL_GetCurrentDisplayMode(0, &DM); - set_zoom(DM.w / 1280); + if(SDL_GetCurrentDisplayMode(0, &DM) == 0) + set_zoom(DM.w / 1280); for(i = 1; i < argc; ++i) { /* get default zoom from flags */ if(strcmp(argv[i], "-s") == 0) {