| 1 |
namespace eval reverse { |
| 2 |
|
| 3 |
variable is_android [string match android "[openmsx_info platform]"] |
| 4 |
|
| 5 |
variable default_auto_enable_reverse |
| 6 |
if {$is_android} { |
| 7 |
set default_auto_enable_reverse "false" |
| 8 |
} else { |
| 9 |
set default_auto_enable_reverse "true" |
| 10 |
} |
| 11 |
|
| 12 |
proc after_switch {} { |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
catch { |
| 17 |
if {$::auto_enable_reverse} { |
| 18 |
auto_enable |
| 19 |
} |
| 20 |
} |
| 21 |
after machine_switch [namespace code after_switch] |
| 22 |
} |
| 23 |
|
| 24 |
} ; |
| 25 |
|
| 26 |
|
| 27 |
user_setting create boolean "auto_enable_reverse" \ |
| 28 |
{Controls whether the reverse feature is automatically enabled on startup (or |
| 29 |
whenever a new machine is created). Internally the reverse feature takes |
| 30 |
regular snapshots of the MSX state, this has a (small) cost in memory and in |
| 31 |
performance. On small systems you may not want this cost, so for these the |
| 32 |
reverse feature can be disabled by default using this setting. |
| 33 |
} $reverse::default_auto_enable_reverse |
| 34 |
|
| 35 |
user_setting create boolean "auto_save_replay" \ |
| 36 |
{Enables automatically saving the current replay to filename specified \ |
| 37 |
in the setting "auto_save_replay_filename" with the interval specified \ |
| 38 |
in the setting "auto_save_replay_interval". |
| 39 |
The file will keep being overwritten until you disable the auto save again.\ |
| 40 |
} false |
| 41 |
|
| 42 |
user_setting create string "auto_save_replay_filename" \ |
| 43 |
{Filename of the replay file that will be saved to when auto_save_replay is \ |
| 44 |
enabled. |
| 45 |
} "auto_save" |
| 46 |
|
| 47 |
user_setting create float "auto_save_replay_interval" \ |
| 48 |
{If enabled, auto save the current replay every number of seconds that is \ |
| 49 |
specified with this setting. |
| 50 |
} 30.0 0.01 100000.0 |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
after realtime 0 {reverse::after_switch} |