diff options
author | P. J. McDermott <pj@pehjota.net> | 2021-03-19 18:24:44 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2021-03-19 18:24:44 (EDT) |
commit | 5321cad3318c93653522fc03f1d9a1995b39e53b (patch) | |
tree | ed6bab42365edfc95d27f987aee141ddbf0dfb4e | |
parent | ecceb4f7eebc8204836e164c4ff655e9abbc2636 (diff) | |
download | dodge-balls-5321cad3318c93653522fc03f1d9a1995b39e53b.zip dodge-balls-5321cad3318c93653522fc03f1d9a1995b39e53b.tar.gz dodge-balls-5321cad3318c93653522fc03f1d9a1995b39e53b.tar.bz2 |
main: Don't create texture
-rw-r--r-- | src/main.c | 18 | ||||
-rw-r--r-- | src/main.h | 1 |
2 files changed, 0 insertions, 19 deletions
@@ -31,7 +31,6 @@ static const char *_db_games_dir; static const char *_db_fonts_dir; static SDL_Window *_db_window; static SDL_Renderer *_db_renderer; -static SDL_Texture *_db_texture; static void _db_find_dirs(char *program_name) @@ -82,16 +81,6 @@ _db_init(void) return -1; } - _db_texture = SDL_CreateTexture(_db_renderer, SDL_PIXELFORMAT_ARGB8888, - SDL_TEXTUREACCESS_STATIC, DB_WINDOW_W, DB_WINDOW_H); - if (_db_texture == NULL) { - db_err("Failed to create texture (%s)", SDL_GetError()); - SDL_DestroyRenderer(_db_renderer); - SDL_DestroyWindow(_db_window); - SDL_Quit(); - return -1; - } - SDL_DisableScreenSaver(); return 0; @@ -101,7 +90,6 @@ static void _db_quit(void) { SDL_EnableScreenSaver(); - SDL_DestroyTexture(_db_texture); SDL_DestroyRenderer(_db_renderer); SDL_DestroyWindow(_db_window); TTF_Quit(); @@ -132,12 +120,6 @@ db_get_renderer(void) return _db_renderer; } -SDL_Texture * -db_get_texture(void) -{ - return _db_texture; -} - int main(int argc, char *argv[]) { @@ -26,6 +26,5 @@ const char *db_get_games_dir(void) __attribute__((__pure__)); const char *db_get_fonts_dir(void) __attribute__((__pure__)); SDL_Window *db_get_window(void) __attribute__((__pure__)); SDL_Renderer *db_get_renderer(void) __attribute__((__pure__)); -SDL_Texture *db_get_texture(void) __attribute__((__pure__)); #endif /* DB_MAIN_H_ */ |