Mercurial > repos > blastem
diff render_sdl.c @ 914:28ec32e720b2
Scale mouse data based on window size
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 14 Dec 2015 19:36:01 -0800 |
parents | b5d35222047e |
children | 9e882eca717e |
line wrap: on
line diff
--- a/render_sdl.c Tue Dec 08 19:33:58 2015 -0800 +++ b/render_sdl.c Mon Dec 14 19:36:01 2015 -0800 @@ -22,6 +22,8 @@ SDL_Rect main_clip; SDL_GLContext *main_context; +int main_width, main_height; + uint8_t render_dbg = 0; uint8_t debug_pal = 0; uint8_t render_gl = 1; @@ -96,6 +98,16 @@ return num_joysticks; } +int render_width() +{ + return main_width; +} + +int render_height() +{ + return main_height; +} + uint32_t render_map_color(uint8_t r, uint8_t g, uint8_t b) { return 255 << 24 | r << 16 | g << 8 | b; @@ -251,6 +263,8 @@ width = mode.w; height = mode.h; } + main_width = width; + main_height = height; render_gl = 0;