Mercurial > molko
comparison src/libmlk-core/core/window.c @ 430:1645433e008d
core: rename ERR_INTERNAL to ERR_SDL
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 15 Oct 2022 17:18:45 +0200 |
parents | 460c78706989 |
children |
comparison
equal
deleted
inserted
replaced
429:67b52de5d3c0 | 430:1645433e008d |
---|---|
19 #include <assert.h> | 19 #include <assert.h> |
20 #include <string.h> | 20 #include <string.h> |
21 | 21 |
22 #include <SDL.h> | 22 #include <SDL.h> |
23 | 23 |
24 #include "error.h" | 24 #include "err.h" |
25 #include "util.h" | 25 #include "util.h" |
26 #include "window.h" | 26 #include "window.h" |
27 #include "window_p.h" | 27 #include "window_p.h" |
28 | 28 |
29 static struct window_handle handle = { | 29 static struct window_handle handle = { |
82 window_open(const char *title, unsigned int w, unsigned int h) | 82 window_open(const char *title, unsigned int w, unsigned int h) |
83 { | 83 { |
84 assert(title); | 84 assert(title); |
85 | 85 |
86 if (!load_window(title, w, h) || !load_renderer()) | 86 if (!load_window(title, w, h) || !load_renderer()) |
87 return errorf("%s", SDL_GetError()); | 87 return ERR_SDL; |
88 | 88 |
89 window.w = w; | 89 window.w = w; |
90 window.h = h; | 90 window.h = h; |
91 | 91 |
92 load_framerate(); | 92 load_framerate(); |