fix warnings

This commit is contained in:
2024-10-08 10:30:11 +03:00
parent 7c0107704d
commit 9b5c043d85
2 changed files with 12 additions and 6 deletions

View File

@ -11,6 +11,7 @@
#include <stb_ds.h>
#include <toml.h>
/* TODO: should not be used here directly */
#ifdef EMSCRIPTEN
#include <GLES2/gl2.h>
#else
@ -22,6 +23,8 @@
static int event_callback(void *userdata, SDL_Event *event) {
(void)userdata;
switch (event->type) {
case SDL_WINDOWEVENT:
if (event->window.windowID != ctx.window_id)
@ -43,6 +46,9 @@ static int event_callback(void *userdata, SDL_Event *event) {
default:
break;
}
/* ignored */
return 0;
}
@ -489,7 +495,7 @@ static bool initialize(void) {
/* might need this to have multiple windows */
ctx.window_id = SDL_GetWindowID(ctx.window);
glViewport(0, 0, ctx.base_render_width, ctx.base_render_height);
glViewport(0, 0, (GLsizei)ctx.base_render_width, (GLsizei)ctx.base_render_height);
/* TODO: */
// SDL_GetRendererOutputSize(ctx.renderer, &ctx.window_w, &ctx.window_h);