From cc5606a731f1b8e08d31b24b11a101f976bd3486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 31 May 2015 15:57:52 -0700 Subject: [PATCH] Added toggle fullscreen key. --- examples/common/entry/entry.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/common/entry/entry.cpp b/examples/common/entry/entry.cpp index 7b1fc566..4437da6d 100644 --- a/examples/common/entry/entry.cpp +++ b/examples/common/entry/entry.cpp @@ -263,6 +263,12 @@ BX_PRAGMA_DIAGNOSTIC_POP(); return 0; } + else if (0 == strcmp(_argv[1], "fullscreen") ) + { + WindowHandle window = { 0 }; + toggleFullscreen(window); + return 0; + } } return 1; @@ -277,6 +283,10 @@ BX_PRAGMA_DIAGNOSTIC_POP(); static const InputBinding s_bindings[] = { { entry::Key::KeyQ, entry::Modifier::LeftCtrl, 1, NULL, "exit" }, + { entry::Key::KeyQ, entry::Modifier::RightCtrl, 1, NULL, "exit" }, + { entry::Key::KeyF, entry::Modifier::LeftCtrl, 1, NULL, "graphics fullscreen" }, + { entry::Key::KeyF, entry::Modifier::RightCtrl, 1, NULL, "graphics fullscreen" }, + { entry::Key::F11, entry::Modifier::None, 1, NULL, "graphics fullscreen" }, { entry::Key::F1, entry::Modifier::None, 1, NULL, "graphics stats" }, { entry::Key::GamepadStart, entry::Modifier::None, 1, NULL, "graphics stats" }, { entry::Key::F1, entry::Modifier::LeftShift, 1, NULL, "graphics stats 0\ngraphics text 0" },