Opened 14 years ago

Closed 14 years ago

Last modified 11 months ago

#8482 closed patch (fixed)

Add a define to disable autosave

Reported by: SF/metafox Owned by:
Priority: normal Component: Port: Dreamcast
Keywords: Cc:
Game:

Description

I made a few simple modifications to the source to add
a #define to a makefile to disable autosave.

This is really needed in the Dreamcast port of ScummVM,
as an autosave is triggered like a regular save, and
displays a confirm save notice every five minutes,
hampering gameplay. Add to the fact that the Dreamcast
uses memory cards rather than standard storage media -
the 'memory blocks' can get filled up rather quickly.

All this patch does is disable autosaving in the
modules that have it enabled if -DAUTOSAVE_OFF is set
in the makefile. If it is not defined, ScummVM
autosaves as usual.

Ticket imported from: #1350187. Ticket imported from: patches/587.

Attachments (2)

scummvm-autosave-define.patch (3.5 KB ) - added by SF/metafox 14 years ago.
Add a define to disable autosave
scummvmautosavedef.patch (561 bytes ) - added by SF/metafox 14 years ago.
Set autosave_period to 0 if NONSTANDARD_PORT is defined

Download all attachments as: .zip

Change History (19)

comment:1 by Kirben, 14 years ago

There is no patch attached.

Actually might be worthing adding a config option, so anyone
can choose to turn auto saves off.

comment:2 by SF/metafox, 14 years ago

I was thinking about adding a checkbox to the options menu
to disable or enable autosaving, in addition to this - as I
was thinking that some people might like to have autosaving
in the Dreamcast port, and all this patch does is disable it
without the option to reenable it (and the Dreamcast doesn't
take options at startup).

comment:3 by sev-, 14 years ago

What would be really useful is config option
'autosave_period' in seconds. When it is set to 0, then
autosave is disabled. All platforms would benefit from this.

by SF/metafox, 14 years ago

Add a define to disable autosave

comment:4 by cyxx, 14 years ago

Owner: set to cyxx
Resolution: duplicate
Status: newclosed

comment:5 by cyxx, 14 years ago

I just committed some code to CVS to handle that the way you
described it, sev.

comment:6 by SF/metafox, 14 years ago

The code you committed to the CVS still doesn't solve the
original point of my submitting this patch in the first place.

An #ifdef for the Dreamcast port should still be added to
the code to set autosave_period to 0 by default in the
Dreamcast port, as autosaving actually hinders performance
in the Dreamcast port since it has to save to the VMU, and
the autosave isn't run in the background as it is with the
ports with internal storage.

comment:7 by cyxx, 14 years ago

I don't think the 'define' thing is a nice solution. IMO,
editing the autosave_period through the GUI would be better.
Re-opening the item.

comment:8 by cyxx, 14 years ago

Resolution: duplicate
Status: closednew

comment:9 by cyxx, 14 years ago

Owner: cyxx removed

by SF/metafox, 14 years ago

Attachment: scummvmautosavedef.patch added

Set autosave_period to 0 if NONSTANDARD_PORT is defined

comment:10 by SF/metafox, 14 years ago

Owner: set to cyxx
Resolution: duplicate
Status: newclosed

comment:11 by SF/metafox, 14 years ago

I did a quick change to main.cpp using #ifdef
NONSTANDARD_PORT, setting it to 0 by default, since most if
not all of these non-standard platforms would probably not
benefit from having autosaving enabled by default.

comment:12 by SF/metafox, 14 years ago

I just saw your comment, cyx. I do think that it'd be best
to have the autosave disabled by default in the Dreamcast
build, but the ability to edit the autosave through the GUI
would be good for those who wish to have it, so they can
enable it if they wish in that port.

The autosave really does hinder performance in the Dreamcast
build, so it's imperative in my opinion that it not be
enabled by default in that port.

comment:13 by cyxx, 14 years ago

Owner: cyxx removed
Resolution: duplicate
Status: closednew

comment:14 by sev-, 14 years ago

Closing this report. If DreamCast port maintainer will
decide to that autosaving should be disabled by default, he
can always override that variable in his port, right before
creating instance of SCUMM engine. Adding this to GUI is
completely different business and either Gregory will do it
by himself, or separate feature request or patch should be
submitted.

#define around already flexible solution is really, really
ugly, and will not be in CVS. That's why I offered to
address this problem in a universal manner in the first
place and cyx implemented it (thanks a lot).

Speaking of NON_STANDARD port, this should go to common
small devices backend.

comment:15 by sev-, 14 years ago

Resolution: fixed
Status: newclosed

comment:16 by sev-, 14 years ago

Ugh, sorry about being too quick with NONSATANDRD port. I
jusdget about its usage on metafox's comments, and it
appeared that he completely misused it.

NONSTANDARD_PORT define is used in ScummVM only for ports
which have their specialized defines and declarations placed
in portdefs.h header. It has nothing with port-specific
features and is used by WinCE, PalmOS, Symbian, PSP and DC
ports. THat means that putting anything within #ifdef
NONSTANDARD_PORT except current usage may have undesirable
side effects on other platforms.

comment:17 by digitall, 11 months ago

Component: Port: Dreamcast
Note: See TracTickets for help on using tickets.