diff options
| author | realtradam <[email protected]> | 2023-06-04 02:35:00 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2023-06-04 02:35:00 -0400 |
| commit | 35558b39040d37c939bd68b56985d6cb5385a451 (patch) | |
| tree | b10516557ba530d96799a8c4bed94b7644938811 /src/input | |
| parent | 856ce67eb21f64d86ecf6bb3651985f10e6236c3 (diff) | |
| download | RodeoKit-35558b39040d37c939bd68b56985d6cb5385a451.tar.gz RodeoKit-35558b39040d37c939bd68b56985d6cb5385a451.zip | |
refactor to have graphics and windowing seperategfx-rewrite
Diffstat (limited to 'src/input')
| -rw-r--r-- | src/input/rodeo_input.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/input/rodeo_input.c b/src/input/rodeo_input.c index f6f0d9f..ee2d180 100644 --- a/src/input/rodeo_input.c +++ b/src/input/rodeo_input.c @@ -4,8 +4,10 @@ #include "rodeo/input.h" #include "irodeo_input_t.h" #include "rodeo/log.h" -// pirvate +#include "rodeo/window.h" +// private #include "rodeo_internal.h" +#include "window/irodeo_window.h" // -- external -- #include "SDL.h" @@ -17,7 +19,7 @@ static irodeo_input_state_t istate = {0}; bool -rodeo_input_events_poll(void) +rodeo_input_poll(void) { SDL_Event event = {0}; while(SDL_PollEvent(&event)) @@ -26,7 +28,7 @@ rodeo_input_events_poll(void) { case SDL_QUIT: { - return true; + rodeo_window_quit(); } //break; case SDL_WINDOWEVENT: @@ -41,17 +43,17 @@ rodeo_input_events_poll(void) BGFX_RESET_VSYNC, BGFX_TEXTURE_FORMAT_COUNT ); - irodeo_screen_width_set((uint16_t)width); - irodeo_screen_height_set((uint16_t)height); + irodeo_window_screen_width_setVar((uint16_t)width); + irodeo_window_screen_height_setVar((uint16_t)height); rodeo_log( rodeo_logLevel_warning, "%"PRIu16"x", - rodeo_screen_width_get() + rodeo_window_screen_width_get() ); rodeo_log( rodeo_logLevel_warning, "%"PRIu16"\n", - rodeo_screen_height_get() + rodeo_window_screen_height_get() ); } } |
