restore build on tip sdl3

This commit is contained in:
2024-09-13 21:42:03 +10:00
parent 85113a449a
commit 3c88666475
2 changed files with 6 additions and 6 deletions

View File

@ -1,8 +1,8 @@
#include "maths.h" #include "maths.h"
#include "draw.h" #include "draw.h"
#include "stick.h" #include "stick.h"
#include <SDL.h> #include <SDL3/SDL.h>
#include <SDL_main.h> #include <SDL3/SDL_main.h>
#include <stdio.h> #include <stdio.h>
#include <stdbool.h> #include <stdbool.h>
@ -82,9 +82,9 @@ int SDL_AppEvent(const SDL_Event* event)
switch (event->type) switch (event->type)
{ {
case (SDL_EVENT_KEY_DOWN): case (SDL_EVENT_KEY_DOWN):
if (event->key.keysym.sym == SDLK_ESCAPE) if (event->key.key == SDLK_ESCAPE)
return 1; return 1;
if (event->key.keysym.sym == SDLK_e) if (event->key.key == SDLK_E)
{ {
showavatar = !showavatar; showavatar = !showavatar;
repaint = true; repaint = true;
@ -144,7 +144,7 @@ int SDL_AppEvent(const SDL_Event* event)
return 0; return 0;
case (SDL_EVENT_MOUSE_BUTTON_DOWN): case (SDL_EVENT_MOUSE_BUTTON_DOWN):
if (event->button.state & (SDL_BUTTON_LMASK | SDL_BUTTON_RMASK)) if (SDL_BUTTON(event->button.button) & (SDL_BUTTON_LMASK | SDL_BUTTON_RMASK))
side = (event->button.x > winw / 2) ? 1 : 0; side = (event->button.x > winw / 2) ? 1 : 0;
return 0; return 0;

View File

@ -2,7 +2,7 @@
#include "metal_shader_types.h" #include "metal_shader_types.h"
#include "metalShader.h" #include "metalShader.h"
#include "maths.h" #include "maths.h"
#include <SDL_metal.h> #include <SDL3/SDL_metal.h>
#import <Metal/Metal.h> #import <Metal/Metal.h>
#import <QuartzCore/CAMetalLayer.h> #import <QuartzCore/CAMetalLayer.h>