summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2017-01-26 00:55:02 -0800
committerMichael Pavone <pavone@retrodev.com>2017-01-26 00:55:02 -0800
commit7046ade2b8c9092381779fa3d902e4650ebc68cf (patch)
tree63bbcb5eb5a863433a6857932ca3f66d7be67ee0 /io.c
parent276fa281b51657ab1fc016bcf797d0abace2e1fc (diff)
Allow toggling full screen mode at runtime. Allow resizing the window in windowed mode. Allow specifying the aspect ratio in the config file.
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/io.c b/io.c
index bde946c..e1f74a8 100644
--- a/io.c
+++ b/io.c
@@ -70,6 +70,7 @@ typedef enum {
UI_NEXT_SPEED,
UI_PREV_SPEED,
UI_RELEASE_MOUSE,
+ UI_TOGGLE_FULLSCREEN,
UI_EXIT
} ui_action;
@@ -415,6 +416,9 @@ void handle_binding_up(keybinding * binding)
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 @@ int parse_binding_target(char * target, tern_node * padbuttons, tern_node *mouse
*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 {