diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/platforms/core_desktop.h | 3 | ||||
| -rw-r--r-- | include/platforms/core_desktop_sdl.h | 14 | ||||
| -rw-r--r-- | include/state.h | 10 |
3 files changed, 18 insertions, 9 deletions
diff --git a/include/platforms/core_desktop.h b/include/platforms/core_desktop.h index c3da090..2dc64e0 100644 --- a/include/platforms/core_desktop.h +++ b/include/platforms/core_desktop.h @@ -1,5 +1,8 @@ #pragma once +#include "glfw3.h" +#include "glfw3native.h" + enum EventType { GLFW_WINDOW_SIZE_EVENT, GLFW_WINDOW_MAXIMIZE_EVENT, diff --git a/include/platforms/core_desktop_sdl.h b/include/platforms/core_desktop_sdl.h index 479b2a1..ea2a86d 100644 --- a/include/platforms/core_desktop_sdl.h +++ b/include/platforms/core_desktop_sdl.h @@ -1,8 +1,12 @@ #pragma once -// #include "SDL.h" +// #define SDL_EVENT_QUEUE_LEN 128 -enum EventType { - SDL_WINDOW_EVENT, - SDL_KEYBOARD_EVENT -}; +#include "SDL.h" + +// typedef struct { +// int SDL_eventQueueLen; +// SDL_Event **SDL_eventQueue; +// } SDL_State; + +// extern SDL_State *SDL_state; diff --git a/include/state.h b/include/state.h index 4b2fe2c..40963f5 100644 --- a/include/state.h +++ b/include/state.h @@ -1,6 +1,8 @@ #pragma once -#define ALLOC_PAGE_SIZE 256 +#ifdef PLATFORM_DESKTOP_SDL + #define PLATFORM_SDL_EVENT_QUEUE_LEN 128 +#endif typedef struct { char *exePath; @@ -14,7 +16,6 @@ typedef struct { Material defaultMaterial; int *RLGLcurrentShaderLocs; /* Events. */ - /* GLFW events. */ #ifdef PLATFORM_DESKTOP /* Window events. */ GLFWwindowsizefun raylibWindowSizeCallback; @@ -30,8 +31,9 @@ typedef struct { GLFWscrollfun raylibMouseScrollCallback; GLFWcursorenterfun raylibCursorEnterCallback; GLFWjoystickfun raylibJoystickCallback; -// #elif PLATFORM_DESKTOP_SDL - +#elif PLATFORM_DESKTOP_SDL + int SDL_eventQueueLen; + SDL_Event *SDL_eventQueue; #endif } State; |
