added key shortcuts for window scaling and toggling fullscreen mode
authorHolger Schemel <info@artsoft.org>
Thu, 11 Sep 2014 09:18:46 +0000 (11:18 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 11 Sep 2014 09:18:46 +0000 (11:18 +0200)
ChangeLog
src/conftime.h
src/events.c

index 3711c4ceedaed00c12929c222705c4176df2291d..c67498433b2e174ded37a6323f21a872621dddeb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-11
+       * added key shortcuts for window scaling and toggling fullscreen mode:
+         - Ctrl-'+', Ctrl-'-' and Ctrl-'0' for up/downscaling and normal size
+         - "F11" key for toggling fullscreen mode (in addition to Alt-Enter)
+
 2014-09-10
        * fixed some drawing bugs when scaling graphics due to "game.tile_size"
        * added some performance improvements when handling SDL surface scaling
index 6e813d9bd96c913eaf083c4f9abd737d79357856..f0217f9fb9416e21d63297ea0e1133dd57272264 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2014-09-10 22:28"
+#define COMPILE_DATE_STRING "2014-09-11 11:11"
index d91a7c46d8d3ce9c5e70a47a207a43be7ec70fa8..ffded62abfc922aa998935ab315f9c4421b0d283 100644 (file)
@@ -1491,8 +1491,10 @@ void HandleKey(Key key, int key_status)
   if (key_status == KEY_RELEASED)
     return;
 
-  if ((key == KSYM_Return || key == KSYM_KP_Enter) &&
-      (GetKeyModState() & KMOD_Alt) && video.fullscreen_available)
+  if ((key == KSYM_F11 ||
+       ((key == KSYM_Return ||
+        key == KSYM_KP_Enter) && (GetKeyModState() & KMOD_Alt))) &&
+      video.fullscreen_available)
   {
     setup.fullscreen = !setup.fullscreen;
 
@@ -1508,8 +1510,12 @@ void HandleKey(Key key, int key_status)
     return;
   }
 
-  if ((key == KSYM_minus || key == KSYM_plus || key == KSYM_0) &&
-      (GetKeyModState() & KMOD_Alt) && video.window_scaling_available &&
+  if ((key == KSYM_minus ||
+       key == KSYM_plus ||
+       key == KSYM_0) &&
+      ((GetKeyModState() & KMOD_Control) ||
+       (GetKeyModState() & KMOD_Alt)) &&
+      video.window_scaling_available &&
       !video.fullscreen_enabled)
   {
     if (key == KSYM_0)