Mercurial > repos > blastem
diff io.c @ 1202:a6ae693974e0
Allow toggling full screen mode at runtime. Allow resizing the window in windowed mode. Allow specifying the aspect ratio in the config file.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 26 Jan 2017 00:55:02 -0800 |
parents | 9bc78bd89567 |
children | 9d6f155732ed |
line wrap: on
line diff
--- a/io.c Wed Jan 25 09:41:12 2017 -0800 +++ b/io.c Thu Jan 26 00:55:02 2017 -0800 @@ -70,6 +70,7 @@ UI_NEXT_SPEED, UI_PREV_SPEED, UI_RELEASE_MOUSE, + UI_TOGGLE_FULLSCREEN, UI_EXIT } ui_action; @@ -415,6 +416,9 @@ render_relative_mouse(0); } break; + case UI_TOGGLE_FULLSCREEN: + render_toggle_fullscreen(); + break; case UI_EXIT: current_system->request_exit(current_system); break; @@ -560,6 +564,8 @@ *ui_out = UI_PREV_SPEED; } else if(!strcmp(target + 3, "release_mouse")) { *ui_out = UI_RELEASE_MOUSE; + } else if (!strcmp(target + 3, "toggle_fullscreen")) { + *ui_out = UI_TOGGLE_FULLSCREEN; } else if(!strcmp(target + 3, "exit")) { *ui_out = UI_EXIT; } else {