mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 23:51:29 -07:00
Add a way for midend_process_key() to report whether it handled a keypress
This adds a new bool * argument, which can be NULL if front ends don't care whether the keypress was handled. Currently they all do that. Currently, "undo" and "redo" keys are treated as not handled if there's no move to undo or redo. This may be a little too strict.
This commit is contained in:
4
osx.m
4
osx.m
@ -632,13 +632,13 @@ struct frontend {
|
||||
|
||||
- (void)processButton:(int)b x:(int)x y:(int)y
|
||||
{
|
||||
if (!midend_process_key(me, x, fe.h - 1 - y, b))
|
||||
if (!midend_process_key(me, x, fe.h - 1 - y, b, NULL))
|
||||
[self close];
|
||||
}
|
||||
|
||||
- (void)processKey:(int)b
|
||||
{
|
||||
if (!midend_process_key(me, -1, -1, b))
|
||||
if (!midend_process_key(me, -1, -1, b, NULL))
|
||||
[self close];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user