projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20060805-2-src
[rocksndiamonds.git]
/
src
/
events.c
diff --git
a/src/events.c
b/src/events.c
index 10166129165a69d3708480c5ed4f4409fff4bfdc..4bb6192d9d023b1c502628a65d08ab6348b0f76c 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-315,6
+315,11
@@
void HandleExposeEvent(ExposeEvent *event)
void HandleButtonEvent(ButtonEvent *event)
{
void HandleButtonEvent(ButtonEvent *event)
{
+#if 0
+ printf("::: BUTTON EVENT: button %d %s\n", event->button,
+ event->type == EVENT_BUTTONPRESS ? "pressed" : "released");
+#endif
+
motion_status = FALSE;
if (event->type == EVENT_BUTTONPRESS)
motion_status = FALSE;
if (event->type == EVENT_BUTTONPRESS)
@@
-345,6
+350,11
@@
void HandleKeyEvent(KeyEvent *event)
Key key = GetEventKey(event, with_modifiers);
Key keymod = (with_modifiers ? GetEventKey(event, FALSE) : key);
Key key = GetEventKey(event, with_modifiers);
Key keymod = (with_modifiers ? GetEventKey(event, FALSE) : key);
+#if 0
+ printf("::: KEY EVENT: %d %s\n", GetEventKey(event, TRUE),
+ event->type == EVENT_KEYPRESS ? "pressed" : "released");
+#endif
+
HandleKeyModState(keymod, key_status);
HandleKey(key, key_status);
}
HandleKeyModState(keymod, key_status);
HandleKey(key, key_status);
}
@@
-677,6
+687,16
@@
void HandleKey(Key key, int key_status)
if (key_status == KEY_RELEASED)
return;
if (key_status == KEY_RELEASED)
return;
+ if (key == KSYM_Return && GetKeyModState() & KMOD_Alt &&
+ video.fullscreen_available)
+ {
+ setup.fullscreen = !setup.fullscreen;
+
+ ToggleFullscreenIfNeeded();
+
+ return;
+ }
+
if (game_status == GAME_MODE_PLAYING && AllPlayersGone &&
(key == KSYM_Return || key == setup.shortcut.toggle_pause))
{
if (game_status == GAME_MODE_PLAYING && AllPlayersGone &&
(key == KSYM_Return || key == setup.shortcut.toggle_pause))
{