diff options
author | Krow Savcik <krow@savcik.xyz> | 2024-02-11 00:22:58 +0200 |
---|---|---|
committer | Krow Savcik <krow@savcik.xyz> | 2024-02-11 00:22:58 +0200 |
commit | 67abc25311d9dc7d12b28d07aaa37fcaf9b5fee5 (patch) | |
tree | 8f2a01b9c06168f538edbf9d99dba312215ea4ef /src | |
parent | 984700a66faac957ee8e0b7b3415587665aa6fbd (diff) |
fix some warnings and compilation errors
Diffstat (limited to 'src')
-rw-r--r-- | src/canvas.c | 1 | ||||
-rw-r--r-- | src/cdraw.c | 5 | ||||
-rw-r--r-- | src/cdraw.h | 2 | ||||
-rw-r--r-- | src/debug.c | 1 | ||||
-rw-r--r-- | src/ui.c | 1 |
5 files changed, 4 insertions, 6 deletions
diff --git a/src/canvas.c b/src/canvas.c index ce8772b..47f9b92 100644 --- a/src/canvas.c +++ b/src/canvas.c @@ -388,6 +388,7 @@ canvas_save(Canvas *c, const char *path, short int s) fclose(fp); if (s) canvas_set_proj_path(c, path); + return 0; } uint8 diff --git a/src/cdraw.c b/src/cdraw.c index 25c0dba..74335d4 100644 --- a/src/cdraw.c +++ b/src/cdraw.c @@ -10,9 +10,6 @@ #include "palette.h" #include "ui.h" -/* macros */ -#define LENGTH(X) (sizeof X / sizeof X[0]) - typedef struct { SDL_Keymod mod; SDL_Keycode sym; @@ -77,7 +74,7 @@ main_window_init(const char *s) return 1; } - ren = SDL_CreateRenderer(win, -1, 0); + ren = SDL_CreateRenderer(win, -1, SDL_RENDERER_PRESENTVSYNC); if (ren == NULL) { printf("SDL_CreateRenderer failed: %s\n", SDL_GetError()); return 1; diff --git a/src/cdraw.h b/src/cdraw.h index 1d66b6b..633eea7 100644 --- a/src/cdraw.h +++ b/src/cdraw.h @@ -15,7 +15,7 @@ extern int mouseX, mouseY; extern const unsigned int back_c; unsigned int main_event_handle(); -unsigned int main_window_init(); +unsigned int main_window_init(const char *); unsigned int main_quit(); /* Functions for user bind to something else */ diff --git a/src/debug.c b/src/debug.c index 3f2b85a..b673835 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1,5 +1,6 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <assert.h> struct debug_header { @@ -13,7 +13,6 @@ #include "palette.h" #define fpan main_ui->focus_panel -#define LENGTH(X) (sizeof X / sizeof *X) #define MAX(a, b) (((a) > (b)) ? (a) : (b)); static const SDL_Rect ui_frame_rect[] = { |