mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Introduced a new function in every game which formats a game_state
as text. This is used by front ends to implement copy-to-clipboard. Currently the function does nothing (and is disabled) in every game except Solo, but it's a start. [originally from svn r5724]
This commit is contained in:
8
midend.c
8
midend.c
@ -573,3 +573,11 @@ char *midend_set_config(midend_data *me, int which, config_item *cfg)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *midend_text_format(midend_data *me)
|
||||
{
|
||||
if (me->ourgame->can_format_as_text && me->statepos > 0)
|
||||
return me->ourgame->text_format(me->states[me->statepos-1]);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user