projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changed drawing to playfield when changing network mode setup options
[rocksndiamonds.git]
/
src
/
events.c
diff --git
a/src/events.c
b/src/events.c
index 22cfdcd12ebadba2d7084591f3d6ec9bac91ab12..12477eea9ff14658ce7809b718a463329a35acee 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-1554,16
+1554,16
@@
void HandleButton(int mx, int my, int button, int button_nr)
strEqual(setup.touch.control_type, TOUCH_CONTROL_FOLLOW_FINGER));
#endif
strEqual(setup.touch.control_type, TOUCH_CONTROL_FOLLOW_FINGER));
#endif
- if (
handle_gadgets && HandleGadget
s(mx, my, button))
+ if (
HandleGlobalAnimClick
s(mx, my, button))
{
/* do not handle this button event anymore */
{
/* do not handle this button event anymore */
-
mx = my = -32; /* force mouse event to be outside screen tiles
*/
+
return; /* force mouse event not to be handled at all
*/
}
}
- if (
HandleGlobalAnimClick
s(mx, my, button))
+ if (
handle_gadgets && HandleGadget
s(mx, my, button))
{
/* do not handle this button event anymore */
{
/* do not handle this button event anymore */
-
return; /* force mouse event not to be handled at all
*/
+
mx = my = -32; /* force mouse event to be outside screen tiles
*/
}
if (button_hold && game_status == GAME_MODE_PLAYING && tape.pausing)
}
if (button_hold && game_status == GAME_MODE_PLAYING && tape.pausing)
@@
-1762,11
+1762,12
@@
static void HandleKeysSpecial(Key key)
}
/* special key shortcuts for all game modes */
}
/* special key shortcuts for all game modes */
- if (is_string_suffix(cheat_input, ":dump-
gadget-id
s") ||
- is_string_suffix(cheat_input, ":d
gi
") ||
- is_string_suffix(cheat_input, ":D
GI
"))
+ if (is_string_suffix(cheat_input, ":dump-
event-action
s") ||
+ is_string_suffix(cheat_input, ":d
ea
") ||
+ is_string_suffix(cheat_input, ":D
EA
"))
{
DumpGadgetIdentifiers();
{
DumpGadgetIdentifiers();
+ DumpScreenIdentifiers();
}
}
}
}
@@
-2030,7
+2031,7
@@
void HandleKey(Key key, int key_status)
if (game_status == GAME_MODE_MAIN &&
(key == setup.shortcut.toggle_pause || key == KSYM_space))
{
if (game_status == GAME_MODE_MAIN &&
(key == setup.shortcut.toggle_pause || key == KSYM_space))
{
- StartGameActions(
options.network
, setup.autorecord, level.random_seed);
+ StartGameActions(
network.enabled
, setup.autorecord, level.random_seed);
return;
}
return;
}
@@
-2221,10
+2222,8
@@
void HandleEventActions()
HandleJoystick();
}
HandleJoystick();
}
-#if defined(NETWORK_AVALIABLE)
- if (options.network)
+ if (network.enabled)
HandleNetworking();
HandleNetworking();
-#endif
switch (game_status)
{
switch (game_status)
{
@@
-2495,3
+2494,18
@@
void HandleSpecialGameControllerKeys(Key key, int key_status)
#endif
#endif
}
#endif
#endif
}
+
+boolean DoKeysymAction(int keysym)
+{
+ if (keysym < 0)
+ {
+ Key key = (Key)(-keysym);
+
+ HandleKey(key, KEY_PRESSED);
+ HandleKey(key, KEY_RELEASED);
+
+ return TRUE;
+ }
+
+ return FALSE;
+}