summaryrefslogtreecommitdiff
path: root/sim.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sim.cpp')
-rw-r--r--sim.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/sim.cpp b/sim.cpp
index 6636ac9..d5eb4b9 100644
--- a/sim.cpp
+++ b/sim.cpp
@@ -260,6 +260,17 @@ void sim_frame(Frame *frame) {
correct_mouse_button(state, &r->button);
}
+ if (keys_pressed[KEY_F11]) {
+ frame->fullscreen = !frame->fullscreen;
+ if (input->nkey_presses == 1) {
+ input->nkey_presses = 0; // consume this key press
+ }
+ }
+ if (state->ctrl && keys_down[KEY_Q]) {
+ frame->close = true;
+ return;
+ }
+
state->win_width = (float)width;
state->win_height = (float)height;
state->aspect_ratio = state->win_width / state->win_height;